在Form extension 版面內找回指定的按鈕回應 :

 /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    [FormControlEventHandler(formControlStr(EcoResCategory, CtrlFormTree), FormControlEventType::Leaving)]
    public static void CtrlFormTree_OnLeaving(FormControl sender, FormControlEventArgs e)
    {
        var EcoResCategory_Code = sender.formRun().design().controlName('EcoResCategory_Code') as FormStringControl;
        var EcoResCategory_WarrantyPeriod = sender.formRun().design().controlName('EcoResCategory_WarrantyPeriod') as FormIntControl;

        
        if(EcoResCategory_WarrantyPeriod.value() == 0)
        {           
           if(EcoResCategory_Code.valueStr()!='') // if code is not empty, show error for asking user input warranty period
                throw warning("Please enter the warranty period");
        }
    }

創作者介紹
創作者 lionlionchopper 的頭像
lionlionchopper

呆子獅的夢想世界

lionlionchopper 發表在 痞客邦 留言(0) 人氣()