Beispiel #1
0
    protected void TxtMemberNo_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string sql, AT;
            sql = AT = "";

            string custname = accop.GetcustnameYN(listfld: accop.GetCENTCUST(), custno: TxtMemberNo.Text, BRCD: Convert.ToString(Session["BRCD"]));

            if (custname != null)
            {
                string[] name = custname.Split('_');

                TxtName.Text = name[0].ToString();
                // TxtName.Text = accop.GetCustName(BRCD: Convert.ToString(Session["BRCD"]), CustNo: TxtMemberNo.Text);
                //  txtMarathiName.Text = accop.GetCustName(BRCD: Convert.ToString(Session["BRCD"]), CustNo: TxtMemberNo.Text);

                DT = LB.DIsplayChequeDet(TxtMemberNo.Text, DdlAccActivity.SelectedValue);
                if (DT.Rows.Count > 0)
                {
                    TxtDivident.Text  = DT.Rows[0]["Shr_INT"].ToString();
                    TxtTAmt.Text      = DT.Rows[0]["DP_INT"].ToString();
                    TxtTotPayAmt.Text = DT.Rows[0]["TotalPay"].ToString();
                    TxtChq.Focus();
                }
                else
                {
                    BtnCrPost.Visible = true;
                }
                TxtDivident.Focus();
            }

            string RC = custname;
            if (RC == "" || RC == null)
            {
                WebMsgBox.Show("Customer not found", this.Page);
                TxtMemberNo.Text = "";
                TxtName.Text     = "";
                TxtMemberNo.Focus();
                return;
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!IsPostBack)
         {
             if (Session["UserName"] == null)
             {
                 Response.Redirect("FrmLogin.aspx");
             }
             autocustname.ContextKey = Session["BRCD"].ToString();
             DD.BindFinancialActivity(DdlAccActivity);
             TxtMemberNo.Focus();
             BtnCrPost.Visible    = false;
             txtChqPrintDate.Text = accop.GetChqPrintDate(Convert.ToString(Session["BRCD"]));
             Clear();
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }