Ejemplo n.º 1
0
    protected void ddlLoanBrName_SelectedIndexChanged(object sender, EventArgs e)
    {
        try
        {
            txtLoanBrCode.Text = "";
            txtLoanBrCode.Text = ddlLoanBrName.SelectedValue.ToString();
            if (ddlActivity.SelectedValue == "1")
            {
                ViewState["LoanBrCode"] = txtLoanBrCode.Text.Trim().ToString();

                autoglname.ContextKey  = ViewState["LoanBrCode"].ToString();
                ViewState["EntryDate"] = MV.openDay(ViewState["LoanBrCode"].ToString());
                txtWorkingDate.Text    = ViewState["EntryDate"].ToString();
            }
            else if (ddlActivity.SelectedValue == "2")
            {
                ViewState["LoanBrCode"] = Session["BRCD"].ToString();
                autoglname.ContextKey   = Session["BRCD"].ToString();
                ViewState["EntryDate"]  = MV.openDay(txtLoanBrCode.Text.Trim().ToString());
                txtWorkingDate.Text     = ViewState["EntryDate"].ToString();
            }
            BindTransGrid();
            TxtPtype.Focus();
            return;
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
Ejemplo n.º 2
0
    protected void TxtCRAccNo_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string AT = "";
            // AT = BD.GetStage1(TxtAccno.Text, Session["BRCD"].ToString(), ViewState["Flag"].ToString());
            AT = BD.Getstage1(TxtCRAccNo.Text, Session["BRCD"].ToString(), TxtCRPType.Text);
            if (AT != "1003")
            {
                lblMessage.Text = "Sorry Customer not Authorise.........!!";
                ModalPopup.Show(this.Page);
                ClearText();
                TxtPtype.Focus();
            }
            else
            {
                int RC = LI.CheckAccount(TxtCRAccNo.Text, TxtCRPType.Text, Session["BRCD"].ToString());

                if (RC < 0)
                {
                    TxtCRAccNo.Focus();
                    WebMsgBox.Show("Please Enter valide Account Number Account Not Exist..........!!", this.Page);
                    return;
                }
                ViewState["CRCustNo"] = RC;
                TxtCRACName.Text      = AO.Getcustname(RC.ToString());
                TxtChequeNo.Focus();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
Ejemplo n.º 3
0
 protected void ddlActivity_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         if (ddlPMTMode.SelectedValue == "3")
         {
             TxtNarration.Focus();
         }
         if (ddlPMTMode.SelectedValue == "7")
         {
             if (ddlActivity.SelectedValue == "1")
             {
                 DivBranch.Visible = true;
                 ddlLoanBrName.Focus();
             }
             else if (ddlActivity.SelectedValue == "2")
             {
                 txtLoanBrCode.Text      = Session["BRCD"].ToString();
                 ViewState["LoanBrCode"] = Session["BRCD"].ToString();
                 DivBranch.Visible       = false;
                 TxtPtype.Focus();
             }
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
 protected void TxtPname_TextChanged(object sender, EventArgs e)
 {
     try
     {
         string   custno = TxtPname.Text;
         string[] CT     = custno.Split('_');
         if (CT.Length > 0)
         {
             TxtPname.Text = CT[0].ToString();
             TxtPtype.Text = CT[1].ToString();
             string[] GLS = BD.GetAccTypeGL(TxtPtype.Text, Session["BRCD"].ToString()).Split('_');
             ViewState["DRGL"] = GLS[1].ToString();
         }
         else
         {
             WebMsgBox.Show("NO Product Types!!!!.....", this.Page);
             TxtPtype.Focus();
             TxtPtype.Text = "";
             TxtPname.Text = "";
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
Ejemplo n.º 5
0
    protected void TxtPname_TextChanged(object sender, EventArgs e)
    {
        string[] TD = TxtPname.Text.Split('_');
        if (TD.Length > 1)
        {
            TxtPname.Text = TD[0].ToString();
            TxtPtype.Text = TD[1].ToString();

            string[] AC = MV.Getaccno(ViewState["LoanBrCode"].ToString(), TxtPtype.Text.Trim().ToString()).Split('_');
            ViewState["GlCode"]    = AC[0].ToString();
            AutoAccname.ContextKey = ViewState["LoanBrCode"].ToString() + "_" + TxtPtype.Text;

            string YN = CC.GetIntACCYN(ViewState["LoanBrCode"].ToString(), TxtPtype.Text);
            if (Convert.ToInt32(ViewState["GlCode"].ToString() == "" ? "0" : ViewState["GlCode"].ToString()) >= 100 && YN != "Y")
            {
                TxtAccNo.Text    = "";
                TxtCustName.Text = "";
                txtCustNo.Text   = "";
                TxtBalance.Text  = "";
                TxtTotalBal.Text = "";

                TxtAccNo.Text    = TxtPtype.Text.ToString();
                TxtCustName.Text = TxtPname.Text.ToString();
                txtCustNo.Text   = "0";

                string[] DTE = Session["EntryDate"].ToString().Split('/');
                TxtBalance.Text  = OC.GetOpenClose("CLOSING", DTE[2].ToString(), DTE[1].ToString(), TxtPtype.Text.Trim().ToString(), "0", Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["GlCode"].ToString()).ToString();
                TxtTotalBal.Text = OC.GetOpenClose("MAIN_CLOSING", DTE[2].ToString(), DTE[1].ToString(), TxtPtype.Text.Trim().ToString(), "0", Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["GlCode"].ToString()).ToString();

                //TxtBalance.Text = MV.GetOpenClose(ViewState["LoanBrCode"].ToString(), TxtPtype.Text.Trim().ToString(), "0", Session["EntryDate"].ToString(), "ClBal").ToString();
                //TxtTotalBal.Text = MV.GetOpenClose(ViewState["LoanBrCode"].ToString(), TxtPtype.Text.Trim().ToString(), "0", Session["EntryDate"].ToString(), "MainBal").ToString();

                TxtNarration.Focus();
            }
            else
            {
                TxtAccNo.Text    = "";
                TxtCustName.Text = "";
                TxtBalance.Text  = "";
                TxtTotalBal.Text = "";
                hdfGlCode.Value  = Convert.ToInt32(ViewState["GlCode"].ToString() == "" ? "0" : ViewState["GlCode"].ToString()).ToString();

                TxtAccNo.Focus();
            }
        }
        else
        {
            lblMessage.Text = "Enter Valid Product code...!!";
            ModalPopup.Show(this.Page);
            ClearText();
            TxtPtype.Focus();
        }
    }
 protected void ddlToBrName_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         txtToBranch.Text      = "";
         txtToBranch.Text      = ddlToBrName.SelectedValue.ToString();
         autoglname.ContextKey = txtToBranch.Text.Trim().ToString();
         TxtPtype.Focus();
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
Ejemplo n.º 7
0
    protected void TxtPtype_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string GL1;

            //Added By Amol on 22092017 as per ambika mam instruction
            if (BD.GetProdOperate(Session["BRCD"].ToString(), TxtPtype.Text.Trim().ToString()).ToString() != "3")
            {
                GL1 = BD.GetAccTypeGL(TxtPtype.Text, Session["BRCD"].ToString());
                if (GL1 != null)
                {
                    string[] GL = GL1.Split('_');
                    TxtPname.Text          = GL[0].ToString();
                    ViewState["GL"]        = GL[1].ToString();
                    AutoAccname.ContextKey = Session["BRCD"].ToString() + "_" + TxtPtype.Text + "_" + ViewState["GL"].ToString();
                    //Added By AmolB ON 20170131 for Check GlgGroup
                    ViewState["GLGroup"] = LD.CheckGlGroup(Session["BRCD"].ToString(), TxtPtype.Text.Trim().ToString());
                    TxtAccNo.Focus();
                }
                else
                {
                    WebMsgBox.Show("Enter valid product code!....", this.Page);
                    TxtPtype.Focus();
                    TxtPtype.Text = "";
                }
            }
            else
            {
                TxtPtype.Text   = "";
                TxtPname.Text   = "";
                lblMessage.Text = "Product is not operating...!!";
                ModalPopup.Show(this.Page);
                return;
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
Ejemplo n.º 8
0
    protected void ClearData()
    {
        TxtPtype.Text    = "";
        TxtPname.Text    = "";
        TxtAccNo.Text    = "";
        TxtCustName.Text = "";
        txtLimitAmt.Text = "";
        TxtDSAmt.Text    = "";
        TxtBalance.Text  = "";
        TxtTotalBal.Text = "";

        txtProdType1.Text        = "";
        txtProdName1.Text        = "";
        TxtAccNo1.Text           = "";
        TxtAccName1.Text         = "";
        TxtChequeNo.Text         = "";
        TxtChequeDate.Text       = "";
        txtAmount.Text           = "";
        TxtChequeDate.Text       = Session["EntryDate"].ToString();
        ddlPayType.SelectedIndex = 0;
        TxtPtype.Focus();
    }
Ejemplo n.º 9
0
    public void Getinfo()
    {
        try
        {
            DataTable DT = new DataTable();
            DT = MV.GetCRDR(Session["BRCD"].ToString(), Session["EntryDate"].ToString(), Session["MID"].ToString());
            if (DT.Rows.Count > 0)
            {
                TxtCRBAL.Text = DT.Rows[0]["CREDIT"].ToString();
                TxtDRBAL.Text = DT.Rows[0]["DEBIT"].ToString();
                double CR, DR;
                CR = DR = 0;
                CR = Convert.ToDouble(TxtCRBAL.Text);
                DR = Convert.ToDouble(TxtDRBAL.Text);

                TxtDiff.Text = (CR - DR).ToString();

                if (CR == DR)
                {
                    btnView.Enabled = true;
                    btnPost.Enabled = true;
                    btnPost.Focus();
                }
                else
                {
                    btnView.Enabled = false;
                    btnPost.Enabled = false;
                    TxtPtype.Focus();
                }
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
 protected void TxtPtype_TextChanged(object sender, EventArgs e)
 {
     try
     {
         if (TxtPtype.Text != null)
         {
             int Result = 0;
             int.TryParse(TxtPtype.Text, out Result);
             string GL   = custcs.GetProductName(Result.ToString(), Session["BRCD"].ToString());
             string GLS1 = BD.GetAccTypeGL(TxtPtype.Text, Session["BRCD"].ToString());
             if (GLS1 != null)
             {
                 string[] NameC = GLS1.Split('_');
                 TxtPname.Text     = NameC[0].ToString();
                 ViewState["DRGL"] = NameC[1].ToString();
                 TxtFDate.Focus();
             }
             else
             {
                 WebMsgBox.Show("Enter valid Product Type!!!!.....", this.Page);
                 TxtPtype.Focus();
                 TxtPtype.Text = "";
             }
         }
         else
         {
             WebMsgBox.Show("Enter valid Product Type!!!!.....", this.Page);
             TxtPtype.Focus();
             TxtPtype.Text = "";
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
Ejemplo n.º 11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                if (Session["UserName"] == null)
                {
                    Response.Redirect("FrmLogin.aspx");
                }

                ViewState["SETNO"]    = "";
                autoglname.ContextKey = Session["BRCD"].ToString();
                LD.DelAllRecTable(Session["BRCD"].ToString(), Session["EntryDate"].ToString(), Session["MID"].ToString());
                BD.BindPayment(ddlPayType, "1");
                BindGrid1();
                TxtPtype.Focus();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
Ejemplo n.º 12
0
    protected void TxtPtype_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string AC1;

            AC1 = MV.Getaccno(ViewState["LoanBrCode"].ToString(), TxtPtype.Text.Trim().ToString());

            if (AC1 != null)
            {
                string[] AC = AC1.Split('_');;
                ViewState["GlCode"]    = AC[0].ToString();
                TxtPname.Text          = AC[1].ToString();
                AutoAccname.ContextKey = ViewState["LoanBrCode"].ToString() + "_" + TxtPtype.Text + "_" + ViewState["GlCode"].ToString();

                string YN = CC.GetIntACCYN(ViewState["LoanBrCode"].ToString(), TxtPtype.Text);
                if (Convert.ToInt32(ViewState["GlCode"].ToString() == "" ? "0" : ViewState["GlCode"].ToString()) >= 100 && YN != "Y") //--abhishek as per GL LEVEL Requirment
                {
                    TxtAccNo.Text    = "";
                    TxtCustName.Text = "";
                    txtCustNo.Text   = "";
                    TxtBalance.Text  = "";
                    TxtTotalBal.Text = "";

                    TxtAccNo.Text    = TxtPtype.Text.ToString();
                    TxtCustName.Text = TxtPname.Text.ToString();
                    txtCustNo.Text   = "0";

                    string[] DTE = Session["EntryDate"].ToString().Split('/');
                    TxtBalance.Text  = OC.GetOpenClose("CLOSING", DTE[2].ToString(), DTE[1].ToString(), TxtPtype.Text.Trim().ToString(), "0", Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["GlCode"].ToString()).ToString();
                    TxtTotalBal.Text = OC.GetOpenClose("MAIN_CLOSING", DTE[2].ToString(), DTE[1].ToString(), TxtPtype.Text.Trim().ToString(), "0", Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["GlCode"].ToString()).ToString();

                    //TxtBalance.Text = MV.GetOpenClose(ViewState["LoanBrCode"].ToString(), TxtPtype.Text.Trim().ToString(), "0", Session["EntryDate"].ToString(), "ClBal").ToString();
                    //TxtTotalBal.Text = MV.GetOpenClose(ViewState["LoanBrCode"].ToString(), TxtPtype.Text.Trim().ToString(), "0", Session["EntryDate"].ToString(), "MainBal").ToString();

                    TxtNarration.Focus();
                }
                else
                {
                    TxtAccNo.Text    = "";
                    TxtCustName.Text = "";
                    TxtBalance.Text  = "";
                    TxtTotalBal.Text = "";
                    hdfGlCode.Value  = Convert.ToInt32(ViewState["GlCode"].ToString() == "" ? "0" : ViewState["GlCode"].ToString()).ToString();

                    TxtAccNo.Focus();
                }
            }
            else
            {
                lblMessage.Text = "Enter Valid Product code...!!";
                ModalPopup.Show(this.Page);
                ClearText();
                TxtPtype.Focus();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
Ejemplo n.º 13
0
    protected void TxtCustName_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string AT = "";

            string   CUNAME  = TxtCustName.Text;
            string[] custnob = CUNAME.Split('_');
            if (custnob.Length > 1)
            {
                TxtCustName.Text = custnob[0].ToString();
                TxtAccNo.Text    = (string.IsNullOrEmpty(custnob[1].ToString()) ? "" : custnob[1].ToString());
            }

            AT = BD.Getstage1(TxtAccNo.Text, Session["BRCD"].ToString(), TxtPtype.Text);
            if (AT != null)
            {
                if (AT != "1003")
                {
                    lblMessage.Text = "Sorry Customer Not Authorise...!!";
                    ModalPopup.Show(this.Page);
                }
                else
                {
                    //Added By AmolB ON 20170131 for Loan Against Gold
                    if (ViewState["GLGroup"].ToString() == "LAG")
                    {
                        Result = LD.CheckRecords(Session["BRCD"].ToString(), TxtPtype.Text, TxtAccNo.Text);

                        if (Result < 1)
                        {
                            TxtPtype.Text    = "";
                            TxtPname.Text    = "";
                            TxtAccNo.Text    = "";
                            TxtCustName.Text = "";

                            lblMessage.Text = "First Enter Ornament Details...!!";
                            ModalPopup.Show(this.Page);
                            return;
                        }
                    }

                    ST = LD.CheckAccount(TxtAccNo.Text, TxtPtype.Text, Session["BRCD"].ToString());
                    if (ST != null)
                    {
                        TxtCustName.Text = AO.Getcustname(ST.ToString());
                        txtCustNo1.Text  = ST.ToString();

                        DT = LD.GetDisburstAMT(TxtPtype.Text, TxtAccNo.Text, Session["EntryDate"].ToString(), Session["BRCD"].ToString());
                        if (Convert.ToDouble(DT.Rows[0]["Limit"].ToString()) == -1)
                        {
                            WebMsgBox.Show("Sorry Not having Disburstment Amount...!!", this.Page);
                            ClearData();
                            TxtPtype.Focus();
                            return;
                        }
                        else
                        {
                            ShowLoanDetails();
                            string LoanCat = LD.GetLoancat(Session["BRCD"].ToString(), TxtPtype.Text.Trim().ToString(), TxtAccNo.Text.Trim().ToString());

                            if (LoanCat != null && LoanCat == "CCOD")
                            {
                                string[] TD = Session["EntryDate"].ToString().Split('/');
                                TxtBalance.Text  = OC.GetOpenClose("CLOSING", TD[2].ToString(), TD[1].ToString(), TxtPtype.Text, TxtAccNo.Text, Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["GL"].ToString()).ToString();
                                TxtTotalBal.Text = OC.GetOpenClose("MAIN_CLOSING", TD[2].ToString(), TD[1].ToString(), TxtPtype.Text, TxtAccNo.Text, Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["GL"].ToString()).ToString();

                                DisbAmount        = Convert.ToDouble(Convert.ToDouble(txtLimitAmt.Text.Trim().ToString()) - Math.Abs(Convert.ToDouble(TxtTotalBal.Text.Trim().ToString())));
                                TxtDSAmt.Text     = (DisbAmount > 0 ? DisbAmount : 0).ToString();
                                txtDrAmount.Text  = Convert.ToDouble(TxtDSAmt.Text.Trim().ToString()).ToString();
                                hdnLimitAmt.Value = Convert.ToDouble(TxtDSAmt.Text.Trim().ToString()).ToString();
                            }
                            else
                            {
                                string[] TD = Session["EntryDate"].ToString().Split('/');
                                TxtBalance.Text  = OC.GetOpenClose("CLOSING", TD[2].ToString(), TD[1].ToString(), TxtPtype.Text, TxtAccNo.Text, Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["GL"].ToString()).ToString();
                                TxtTotalBal.Text = OC.GetOpenClose("MAIN_CLOSING", TD[2].ToString(), TD[1].ToString(), TxtPtype.Text, TxtAccNo.Text, Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["GL"].ToString()).ToString();

                                DisbAmount        = Convert.ToDouble(Convert.ToDouble(txtLimitAmt.Text.Trim().ToString()) - Math.Abs(Convert.ToDouble(TxtTotalBal.Text.Trim().ToString())));
                                TxtDSAmt.Text     = (DisbAmount > 0 ? DisbAmount : 0).ToString();
                                txtDrAmount.Text  = Convert.ToDouble(TxtDSAmt.Text.Trim().ToString()).ToString();
                                hdnLimitAmt.Value = Convert.ToDouble(TxtDSAmt.Text.Trim().ToString()).ToString();
                            }
                            TxtDSAmt.Focus();
                            DivPayment.Visible = true;
                        }
                    }
                    else
                    {
                        TxtAccNo.Focus();
                        WebMsgBox.Show("Please Enter valid Account Number.. Account Not Exist...!!", this.Page);
                        return;
                    }
                    BindTempGrid();
                }
            }
            else
            {
                WebMsgBox.Show("Enter valid account number...!!", this.Page);
                TxtAccNo.Focus();
                TxtAccNo.Text = "";
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }