protected void TxtAccName_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string ACST = "";
            ACST = OC.GETACCStatus(Session["BRCD"].ToString(), TxtAccNo.Text, TxtProcode.Text);
            if (ACST != "3")
            {
                TxtACStatus.Text = "Normal/Operative";
                string   CUNAME  = TxtAccName.Text;
                string[] custnob = CUNAME.Split('_');
                if (custnob.Length > 1)
                {
                    TxtAccName.Text = custnob[0].ToString();
                    TxtAccNo.Text   = (string.IsNullOrEmpty(custnob[1].ToString()) ? "" : custnob[1].ToString());
                    TxtCustNo.Text  = custnob[2].ToString();
                    string[] TD = Session["EntryDate"].ToString().Split('/');

                    GetOpening();
                    GetBal();
                    GetIDetails();
                    GetLID();
                    GetChrgs("UCC");
                    GetChrgs("MCM");

                    if (TxtAccNo.Text == "")
                    {
                        TxtAccName.Text = "";
                        return;
                    }
                    TxtBookUnused.Focus();
                }
                else
                {
                    lblMessage.Text = "";
                    lblMessage.Text = "Invalid Account Number.........!!";
                    ModalPopup.Show(this.Page);
                    TxtAccNo.Focus();
                    return;
                }
            }

            else
            {
                WebMsgBox.Show("Account already closed!...", this.Page);
                Clear();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
            //Response.Redirect("FrmLogin.aspx", true);
        }
    }
    public void accno()
    {
        try
        {
            string AT   = "";
            string ACST = "";
            ACST = OC.GETACCStatus(Session["BRCD"].ToString(), TxtAccNo.Text, TxtProcode.Text);
            if (ACST != "3")
            {
                AT = BD.Getstage1(TxtAccNo.Text, Session["BRCD"].ToString(), TxtProcode.Text);
                if (AT != null)
                {
                    if (AT != "1003")
                    {
                        lblMessage.Text = "Sorry Customer not Authorise.........!!";
                        ModalPopup.Show(this.Page);
                        //  Clear();
                    }
                    else
                    {
                        TxtACStatus.Text = "Normal/Operative";
                        string[] TD = Session["EntryDate"].ToString().Split('/');

                        if (TxtAccNo.Text == "")
                        {
                            TxtAccName.Text = "";
                            goto ext;
                        }

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

                            GetOpening();
                            GetBal();
                            GetIDetails();
                            GetLID();
                            GetChrgs("UCC");
                            GetChrgs("MCM");

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

                        if (TxtAccNo.Text == "" || TxtProcode.Text == "")
                        {
                            TxtAccName.Text = "";
                            goto ext;
                        }
                        dt1 = customcs.GetAccNoAccType(TxtProcode.Text, TxtAccNo.Text, Session["BRCD"].ToString());

                        if (dt1 != null && dt1.Rows.Count != 0)
                        {
                        }
                        else
                        {
                        }
                        ext :;
                    }
                }
                else
                {
                    WebMsgBox.Show("Enter Valid Account number!...", this.Page);
                    TxtAccNo.Text = "";
                    TxtAccNo.Focus();
                }
            }
            else
            {
                WebMsgBox.Show("Account No. " + TxtAccNo.Text + " already closed!...", this.Page);
                Clear();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
            //Response.Redirect("FrmLogin.aspx", true);
        }
    }