Exemplo n.º 1
0
        protected void cvTxtName_ServerValidate(object source, ServerValidateEventArgs args)
        {
            try
            {
                //ReturnIntViewBO objReturnInt = new ReturnIntViewBO();
                //objReturnInt = SettingsBO.ValidateField(this.QueryID, "JobName", "Name", this.txtName.Text);
                //args.IsValid = objReturnInt.RetVal == 1;

                int clientID = int.Parse(this.ddlClient.SelectedValue);
                args.IsValid = IndicoPage.ValidateField2(this.QueryID, "JobName", "Name", this.txtName.Text, "Client", clientID.ToString()) == 1;
            }
            catch (Exception ex)
            {
                IndicoLogging.log.Error("Error occured while cvTxtName_ServerValidate on AddEditClient.aspx", ex);
            }
        }
Exemplo n.º 2
0
        protected void cvTxtName_ServerValidate(object source, ServerValidateEventArgs args)
        {
            try
            {
                int clientID = int.Parse(this.hdnSelectedClientID.Value.Trim());
                int disID    = int.Parse(ddlDistributor.SelectedValue);

                //ReturnIntViewBO objReturnInt = new ReturnIntViewBO();
                //objReturnInt = SettingsBO.ValidateField(clientID, "Client", "Name", this.txtClientName.Text);
                //args.IsValid = objReturnInt.RetVal == 1;

                args.IsValid = IndicoPage.ValidateField2(clientID, "Client", "Name", this.txtClientName.Text, "Distributor", disID.ToString()) == 1;
            }
            catch (Exception ex)
            {
                IndicoLogging.log.Error("Error occured while cvTxtName_ServerValidate on ViewDistributorClients.aspx", ex);
            }
        }