public void CustNoChanged()
    {
        try
        {
            string sql, AT;
            sql = AT = "";

            if (TxtCustno.Text == "")
            {
                return;
            }
            string custname = accop.GetcustnameYN(accop.GetCENTCUST(), TxtCustno.Text, Session["BRCD"].ToString());

            if (custname != null)
            {
                string[] name = custname.Split('_');
                TxtCustname.Text = name[0].ToString();
                TxtEmpNo.Text    = TxtCustno.Text;
                bindgrid();
                TxtDivNO.Focus();
            }

            string RC = TxtCustname.Text;
            if (RC == "")
            {
                WebMsgBox.Show("Customer not found", this.Page);
                TxtCustno.Text = "";
                TxtCustno.Focus();
                return;
            }
            RES = avs5029.ChkExist(TxtCustno.Text);
            if (RES > 0)
            {
                BtnAddNew.Enabled    = false;
                div_Main.Visible     = false;
                BtnAddNew.Visible    = true;
                BtnModify.Visible    = false;
                Submit.Visible       = false;
                BtnAuthorise.Visible = false;
                BtnDelete.Visible    = false;
                Exit.Visible         = false;
            }
            else
            {
                BtnAddNew.Enabled    = true;
                div_Main.Visible     = true;
                BtnAddNew.Visible    = false;
                BtnModify.Visible    = false;
                Submit.Visible       = true;
                BtnAuthorise.Visible = false;
                BtnDelete.Visible    = false;
                Exit.Visible         = false;
                bindgrid();
            }
        }
        catch (Exception EX)
        {
            ExceptionLogging.SendErrorToText(EX);
        }
    }
Beispiel #2
0
    protected void TxtCustno_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string AT = CM.GetStage(Session["BRCD"].ToString(), TxtCustno.Text);

            if (AT == "1003")
            {
                TxtCustname.Text = BD.GetCustName(TxtCustno.Text, Session["BRCD"].ToString());
                CallCustDetails(TxtCustno.Text);
                return;
            }
            else if (AT == "1004")
            {
                ClearData();
                WebMsgBox.Show("Customer is Deleted...!!", this.Page);
                return;
            }
            else
            {
                WebMsgBox.Show("Invalid Customer No...!!", this.Page);
                TxtCustno.Text = "";
                TxtCustno.Focus();
                return;
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
Beispiel #3
0
 public void ClearData()
 {
     TxtCustno.Text              = "";
     TxtCustname.Text            = "";
     TxtLoaneeAccName.Text       = "";
     TxtLoaneeAccno.Text         = "";
     TxtLoaneeSubgl.Text         = "";
     TxtLoaneeSubglname.Text     = "";
     TxtS_Custno.Text            = "";
     TxtS_Custname.Text          = "";
     TxtPriAmt.Text              = "";
     TxtIntAmt.Text              = "";
     TxtRecDept.Text             = "";
     TxtRecDeptName.Text         = "";
     TxtRecDiv.Text              = "";
     TxtRecDivName.Text          = "";
     Ddl_Status.SelectedValue    = "0";
     GridLoanAccno.DataSource    = null;
     GridSuretyDeduct.DataSource = null;
     GridSurities.DataSource     = null;
     GridLoanAccno.DataBind();
     GridSuretyDeduct.DataBind();
     GridSurities.DataBind();
     Rdb_Type.SelectedValue = "I";
     TxtCustno.Focus();
 }
Beispiel #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         AutoCustName.ContextKey = Session["BRCD"].ToString();
         TxtCustno.Focus();
     }
 }
Beispiel #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         BindBr();
         TxtCustno.Focus();
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (Session["UserName"] == null)
            {
                Response.Redirect("FrmLogin.aspx");
            }

            if (!IsPostBack)
            {
                string allow = com.ChkECS(Session["BRCD"].ToString());
                if (allow == "Y")
                {
                    AutoCompleteExtenderminor.ContextKey = Session["BRCD"].ToString();
                    autooffcname.ContextKey = Session["BRCD"].ToString();
                    bd.BindDesig(ddlDesig);
                    bd.BindACCTYPE(ddlCustType);
                    if (!string.IsNullOrEmpty(Request.QueryString["CUSTNO"]))
                    {
                        TxtCustno.Text = Request.QueryString["CUSTNO"].ToString();
                        CustNoChanged();
                    }
                    EmptyGridBind();
                }
                else
                {
                    Response.Redirect("~/FrmBlank.aspx?ShowMessage=true");
                }

                TxtCustno.Focus();
            }
        }
        catch (Exception ex)
        {
            ExceptionLogging.SendErrorToText(ex);
        }
    }