bool Save_Validation(ref StringBuilder Sb_Msg)
        {
            WebControl Wc;
            bool       IsValid = true;

            this.Txt_ItemCode.CssClass = Layer01_Constants_Web.CnsCssTextbox;
            if (this.Txt_ItemCode.Text.Trim() == "")
            {
                this.Txt_ItemCode.Text = Layer02_Common.GetSeriesNo("Item");
            }

            Wc = this.Txt_ItemCode;
            ClsBasePageDetails.Save_Validation(
                ref Sb_Msg
                , ref Wc
                , ref IsValid
                , Layer01_Constants_Web.CnsCssTextbox
                , Layer01_Constants_Web.CnsCssTextbox_ValidateHighlight
                , (Layer02_Common.CheckSeriesDuplicate("uvw_Item", "Code", this.mObj.GetKeys(), this.Txt_ItemCode.Text))
                , "Duplicate Item No. found. Please change the Item No." + "<br />");

            Wc = this.Txt_ItemName;
            ClsBasePageDetails.Save_Validation(
                ref Sb_Msg
                , ref Wc
                , ref IsValid
                , Layer01_Constants_Web.CnsCssTextbox
                , Layer01_Constants_Web.CnsCssTextbox_ValidateHighlight
                , (this.Txt_ItemName.Text.Trim() != "")
                , "Item Name is required." + "<br />");

            return(IsValid);
        }
Exemplo n.º 2
0
        public bool Update_Validate(ref System.Text.StringBuilder Sb_Msg)
        {
            bool       IsValid = true;
            ClsAddress Obj     = this.mObj_Address;
            WebControl Wc;

            Wc = this.Txt_Address;
            ClsBasePageDetails.Save_Validation(
                ref Sb_Msg
                , ref Wc
                , ref IsValid
                , Layer01_Constants_Web.CnsCssTextbox
                , Layer01_Constants_Web.CnsCssTextbox_ValidateHighlight
                , (this.Txt_Address.Text.Trim() == "")
                , "Address is required." + "<br />");

            Wc = this.Txt_City;
            ClsBasePageDetails.Save_Validation(
                ref Sb_Msg
                , ref Wc
                , ref IsValid
                , Layer01_Constants_Web.CnsCssTextbox
                , Layer01_Constants_Web.CnsCssTextbox_ValidateHighlight
                , (this.Txt_City.Text.Trim() == "")
                , "City is required." + "<br />");

            Wc = this.Txt_ZipCode;
            ClsBasePageDetails.Save_Validation(
                ref Sb_Msg
                , ref Wc
                , ref IsValid
                , Layer01_Constants_Web.CnsCssTextbox
                , Layer01_Constants_Web.CnsCssTextbox_ValidateHighlight
                , (this.Txt_ZipCode.Text.Trim() == "")
                , "Zip Code is required." + "<br />");

            Wc = this.Cbo_State;
            ClsBasePageDetails.Save_Validation(
                ref Sb_Msg
                , ref Wc
                , ref IsValid
                , Layer01_Constants_Web.CnsCssTextbox
                , Layer01_Constants_Web.CnsCssTextbox_ValidateHighlight
                , (this.Cbo_State.SelectedValue == "0")
                , "Province / State is required." + "<br />");

            Wc = this.Cbo_Country;
            ClsBasePageDetails.Save_Validation(
                ref Sb_Msg
                , ref Wc
                , ref IsValid
                , Layer01_Constants_Web.CnsCssTextbox
                , Layer01_Constants_Web.CnsCssTextbox_ValidateHighlight
                , (this.Cbo_Country.SelectedValue == "0")
                , "Country is required." + "<br />");

            return(IsValid);
        }
        bool Save_Validation(ref System.Text.StringBuilder Sb_Msg)
        {
            WebControl Wc;
            bool       IsValid = true;

            this.Txt_EmployeeCode.CssClass = Layer01_Constants_Web.CnsCssTextbox;
            if (this.Txt_EmployeeCode.Text.Trim() == "")
            {
                this.Txt_EmployeeCode.Text = Layer02_Common.GetSeriesNo("Item");
            }

            Wc = this.Txt_EmployeeCode;
            ClsBasePageDetails.Save_Validation(
                ref Sb_Msg
                , ref Wc
                , ref IsValid
                , Layer01_Constants_Web.CnsCssTextbox
                , Layer01_Constants_Web.CnsCssTextbox_ValidateHighlight
                , (Layer02_Common.CheckSeriesDuplicate("uvw_Employee", "EmployeeCode", this.mObj.GetKeys(), this.Txt_EmployeeCode.Text))
                , "Duplicate Employee ID found. Please change the Employee ID." + "<br />");

            Wc = null;
            ClsBasePageDetails.Save_Validation(
                ref Sb_Msg
                , ref Wc
                , ref IsValid
                , string.Empty
                , string.Empty
                , (this.EODtp_DateHired.SelectedDate == null)
                , "Hired Date is required" + "<br />");

            if (!this.UcPerson.Update_Validate(ref Sb_Msg))
            {
                IsValid = false;
            }

            return(IsValid);
        }