protected void txtBrCode_TextChanged(object sender, EventArgs e)
 {
     try
     {
         if (txtBrCode.Text != "")
         {
             string bname = TC.GetBranchName(txtBrCode.Text.Trim().ToString());
             if (bname != null)
             {
                 txtBrName.Text = bname;
                 Btn_Submit.Focus();
             }
             else
             {
                 lblMessage.Text = "Enter valid Branch Code...!!";
                 ModalPopup.Show(this.Page);
                 return;
             }
         }
         else
         {
             lblMessage.Text = "Enter Branch Code...!!";
             ModalPopup.Show(this.Page);
             txtBrCode.Focus();
             return;
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
Esempio n. 2
0
 protected void TxtFBRCD_TextChanged(object sender, EventArgs e)
 {
     try
     {
         if (TxtFBRCD.Text != "")
         {
             string bname = AST.GetBranchName(TxtFBRCD.Text);
             if (bname != null)
             {
                 TxtFBRCDName.Text = bname;
                 if (Rdb_RepType.SelectedValue == "1")
                 {
                     Btn_Submit.Focus();
                 }
                 else
                 {
                     TxtFPRD.Focus();
                 }
             }
             else
             {
                 WebMsgBox.Show("Enter valid Branch Code.....!", this.Page);
                 TxtFBRCD.Text = "";
                 TxtFBRCD.Focus();
             }
         }
         else
         {
             WebMsgBox.Show("Enter Branch Code!....", this.Page);
             TxtFBRCD.Text = "";
             TxtFBRCD.Focus();
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
    protected void TxtTAccName_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string   CUNAME  = TxtTAccName.Text;
            string[] custnob = CUNAME.Split('_');
            if (custnob.Length > 1)
            {
                TxtTAccName.Text = custnob[0].ToString();
                TxtTAccno.Text   = (string.IsNullOrEmpty(custnob[1].ToString()) ? "" : custnob[1].ToString());

                string[] TD = Session["EntryDate"].ToString().Split('/');

                if (TxtTAccno.Text == "")
                {
                    TxtTAccName.Text = "";
                    return;
                }
                Btn_Submit.Focus();
            }
            else
            {
                lblMessage.Text = "";
                lblMessage.Text = "Invalid Account Number.........!!";
                ModalPopup.Show(this.Page);
                TxtTAccno.Text   = "";
                TxtTAccName.Text = "";
                TxtTAccno.Focus();
                return;
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
            //Response.Redirect("FrmLogin.aspx", true);
        }
    }
    protected void TxtTAccno_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string AT   = "";
            string ACST = "";
            ACST = OC.GETACCStatus(Session["BRCD"].ToString(), TxtTAccno.Text, TxtTProcode.Text);
            if (ACST != "3")
            {
                AT = BD.Getstage1(TxtTAccno.Text, Session["BRCD"].ToString(), TxtTProcode.Text);
                if (AT != null)
                {
                    if (AT != "1003")
                    {
                        lblMessage.Text = "Sorry Customer not Authorise.........!!";
                        ModalPopup.Show(this.Page);
                        //  Clear();
                    }
                    else
                    {
                        string[] TD = Session["EntryDate"].ToString().Split('/');

                        if (TxtTAccno.Text == "")
                        {
                            TxtTAccName.Text = "";
                            goto ext;
                        }

                        DataTable dt1 = new DataTable();
                        if (TxtTAccno.Text != "" & TxtTProcode.Text != "")
                        {
                            string   PRD = "";
                            string[] CN;
                            PRD = TxtTProcode.Text;
                            CN  = customcs.GetAccountName(TxtTAccno.Text.ToString(), PRD, Session["BRCD"].ToString()).Split('_');
                            ViewState["CUSTNO"] = CN[0].ToString();

                            TxtTAccName.Text = CN[1].ToString();

                            if (TxtTAccName.Text == "" & TxtTAccno.Text != "")
                            {
                                WebMsgBox.Show("Please enter valid Account number", this.Page);
                                TxtTAccno.Text = "";
                                TxtTAccno.Focus();
                                return;
                            }
                            Btn_Submit.Focus();
                        }

                        if (TxtTAccno.Text == "" || TxtTProcode.Text == "")
                        {
                            TxtTAccName.Text = "";
                            goto ext;
                        }
                        dt1 = customcs.GetAccNoAccType(TxtTProcode.Text, TxtTAccno.Text, Session["BRCD"].ToString());

                        if (dt1 != null && dt1.Rows.Count != 0)
                        {
                        }
                        else
                        {
                        }
                        ext :;
                    }
                }
                else
                {
                    WebMsgBox.Show("Enter Valid Account number!...", this.Page);
                    TxtTAccno.Text = "";
                    TxtTAccno.Focus();
                }
            }
            else
            {
                WebMsgBox.Show("Account already closed!...", this.Page);
                Clear();
            }
        }

        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
            //Response.Redirect("FrmLogin.aspx", true);
        }
    }