protected void Pay0_Click(object sender, EventArgs e)
    {
        if (agent_no.Text == "" || com_amt.Text == "" || td_ded.Text == "" || Savingaccno.Text == "")
        {
            WebMsgBox.Show("Sorry. PLease Enter requer fild", this.Page);
            agent_no.Focus();
            com_amt.Focus();
            Savingaccno.Focus();
            td_ded.Focus();
            return;
        }
        else
        {
            string scroll_no = "";


            int glcode = CLScom.GetGLcode("1007", Session["BRCD"].ToString());
            int plcode = CLScom.GetPLaccno("1007", Session["BRCD"].ToString());
            int setno  = Convert.ToInt32(conn.sExecuteScalar("SELECT MAX(LASTNO)FROM AVS1000 WHERE ACTIVITYNO=7"));

            int auther = ATH.Authorized(Session["EntryDate"].ToString(), Session["EntryDate"].ToString(), Session["EntryDate"].ToString(), glcode.ToString(), plcode.ToString(), agent_no.Text.ToString(), net_commission.Text.ToString(), net_commission.Text.ToString(), net_commission.Text.ToString(), "1", "7", "Transfer", setno.ToString(), "", "", "", "", "1001", "", Session["BRCD"].ToString(), Session["MID"].ToString(), "0", "0", "0", SA_no.Text.ToString(), SA_name.Text.ToString(), "0", "0");
            if (auther == 1)
            {
                WebMsgBox.Show("Transfer is complete'", this.Page);
            }

            /*
             * agent_no.Text = "";
             * Agent_name.Text = "";
             * Start_date.Text = "";
             * last_date.Text = "";
             * Total_coll.Text = "";
             * commission.Text = "";
             * com_amt.Text = "";
             * td_ded.Text = "";
             * TDamt.Text = "";
             * net_commission.Text = "";
             * Savingaccno.Text = "";
             * SA_name.Text = "";
             * SA_no.Text = "";
             * agent_no.Focus();
             */
            /*   WebMsgBox.Show("validation is OK",this.Page);
             *  ?*/
        }
    }
 protected void TDAmt_txtchg(object sender, EventArgs e)
 {
     if (com_amt.Text == "" || com_amt.Text == "0")
     {
         WebMsgBox.Show("COLLECTION IS ZERO or NUll ", this.Page);
         td_ded.Text = "";
         com_amt.Focus();
     }
     else
     {
         Coms                = OP.TDamount(com_amt.Text, td_ded.Text, Session["BRCD"].ToString());
         TDamt.Text          = Coms.ToString();
         Coms                = OP.NetCommission(com_amt.Text, TDamt.Text, Session["BRCD"].ToString());
         net_commission.Text = Coms.ToString();
         Savingaccno.Focus();
     }
 }
    protected void saving_txtchg(object sender, EventArgs e)
    {
        Result = OP.GetSAaccexit(Savingaccno.Text, Session["BRCD"].ToString());
        if (Result == 0)
        {
            WebMsgBox.Show("Sorry Account Number Not Exist......!!", this.Page);
            SA_name.Text = "";
            SA_no.Text   = "";
            Savingaccno.Focus();
        }
        int RC = OP.GetSAcustno(Savingaccno.Text, Session["BRCD"].ToString());

        if (RC < 0)
        {
            Savingaccno.Focus();
            WebMsgBox.Show("Please Enter valide Account Number Account Not Exist..........!!", this.Page);
        }

        ViewState["SA_no"] = RC;
        SA_no.Text         = RC.ToString();
        SA_name.Text       = BD.GetCustName(RC.ToString(), Session["BRCD"].ToString());
    }