protected void TxtBRCD_TextChanged(object sender, EventArgs e)
 {
     try
     {
         if (TxtBRCD.Text != "")
         {
             string bname = AST.GetBranchName(TxtBRCD.Text);
             if (bname != null)
             {
                 TxtBrname.Text = bname;
                 TxtAccType.Focus();
             }
             else
             {
                 WebMsgBox.Show("Enter valid Branch Code.....!", this.Page);
                 TxtBRCD.Text = "";
                 TxtBRCD.Focus();
             }
         }
         else
         {
             WebMsgBox.Show("Enter Branch Code!....", this.Page);
             TxtBRCD.Text = "";
             TxtBRCD.Focus();
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
    protected void TxtAccType_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string AC1;
            AC1 = LC.Getaccno(TxtAccType.Text, Session["BRCD"].ToString(), "");

            if (AC1 != null)
            {
                string[] AC = AC1.Split('-');;
                ViewState["ACCNO"]     = AC[0].ToString();
                ViewState["GLCODE"]    = AC[1].ToString();
                TxtATName.Text         = AC[2].ToString();
                AutoAccname.ContextKey = Session["BRCD"].ToString() + "_" + TxtAccType.Text + "_" + ViewState["GLCODE"].ToString();
                txtAsOnDate.Focus();
            }
            else
            {
                WebMsgBox.Show("Enter valid Product code!.....", this.Page);
                TxtAccType.Text = "";
                TxtATName.Text  = "";
                TxtAccType.Focus();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                if (Session["UserName"] == null)
                {
                    Response.Redirect("FrmLogin.aspx");
                }
                DD.BindtableActivity(DdlAccActivity);
                string YEAR = "";
                YEAR = DateTime.Now.Date.Year.ToString();//DT.Year.ToString();

                DivLoan.Visible           = false;
                DivCalculatedData.Visible = false;

                GridView1009.Visible = false;
                GridViewLoan.Visible = false;
                GridViewAcc.Visible  = false;
                GridViewGL.Visible   = false;

                TxtBRCD.Text          = Session["BRCD"].ToString();
                TxtBrname.Text        = AST.GetBranchName(TxtBRCD.Text);
                autoglname.ContextKey = Session["BRCD"].ToString();
                // TxtBRCD.Focus();
                TxtAccType.Focus();
                //added by ankita 07/10/2017 to make user frndly
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            try
            {
                if (Session["UserName"] == null)
                {
                    Response.Redirect("FrmLogin.aspx");
                }
                string YEAR = "";
                YEAR = DateTime.Now.Date.Year.ToString();//DT.Year.ToString();

                TxtTDate.Text         = Session["EntryDate"].ToString();
                TxtBRCD.Text          = Session["BRCD"].ToString();
                TxtBrname.Text        = AST.GetBranchName(TxtBRCD.Text);
                autoglname.ContextKey = Session["BRCD"].ToString();
                // TxtBRCD.Focus();
                TxtAccType.Focus();
                TxtFDate.Text = conn.sExecuteScalar("select '01/04/'+ convert(varchar(10),(year(dateadd(month, -3,'" + conn.ConvertDate(Session["EntryDate"].ToString()) + "'))))");
            }
            catch (Exception Ex)
            {
                ExceptionLogging.SendErrorToText(Ex);
            }
        }
    }
    protected void TxtAcctypeName_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string   custno = TxtAcctypeName.Text;
            string[] CT     = custno.Split('_');
            if (CT.Length > 0)
            {
                TxtAcctypeName.Text = CT[0].ToString();
                TxtAccType.Text     = CT[1].ToString();
                //TxtGLCD.Text = CT[2].ToString();
                string[] GLS = BD.GetAccTypeGL(TxtAccType.Text, Session["BRCD"].ToString()).Split('_');
                ViewState["GL"]        = GLS[1].ToString();
                AutoAccname.ContextKey = Session["BRCD"].ToString() + "_" + TxtAccType.Text + "_" + ViewState["GL"].ToString();

                int GL = 0;
                int.TryParse(ViewState["GL"].ToString(), out GL);
                TxtAccNo.Focus();


                if (TxtAcctypeName.Text == "")
                {
                    WebMsgBox.Show("Please enter valid Product code", this.Page);
                    TxtAccType.Text = "";
                    TxtAccType.Focus();
                }
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
            //Response.Redirect("FrmLogin.aspx", true);
        }
    }
    protected void txtCustNo_TextChanged(object sender, EventArgs e)
    {
        string AT = "";

        AT = CLS.Getstage1(txtCustNo.Text, Session["BRCD"].ToString());
        if (AT != "1003")
        {
            lblMessage.Text = "Sorry Customer not Authorise.........!!";
            ModalPopup.Show(this.Page);
            txtCustNo.Text   = "";
            txtcustname.Text = "";
            txtCustNo.Focus();
        }
        else
        {
            string CUSTNAME = CLS.GetCustNAme(txtCustNo.Text, Session["BRCD"].ToString());
            if (CUSTNAME != null || CUSTNAME != "")
            {
                txtcustname.Text = CUSTNAME;
                BINDCUSTGRID();
                TxtAccType.Focus();
            }
            else
            {
                lblMessage.Text = "Cust No Not Exit In Master   ...!!!";
                ModalPopup.Show(this.Page);
                return;
            }
        }
    }
Esempio n. 7
0
 protected void TxtAccno_TextChanged(object sender, EventArgs e)
 {
     try
     {
         if (TxtBRCD.Text != "")
         {
             string AT = "";
             // AT = BD.GetStage1(TxtAccno.Text, Session["BRCD"].ToString(), ViewState["Flag"].ToString());
             AT = BD.Getstage1(TxtAccno.Text, TxtBRCD.Text, TxtAccType.Text);
             if (AT != "1003")
             {
                 lblMessage.Text = "Sorry Customer not Authorise.........!!";
                 ModalPopup.Show(this.Page);
                 TxtAccHName.Text = "";
                 TxtAccType.Text  = "";
                 TxtATName.Text   = "";
                 TxtAccno.Text    = "";
                 TxtBRCD.Text     = "";
                 TxtAccType.Focus();
             }
             else
             {
                 string checkprintstatus = AST.checkstatus(TxtBRCD.Text, TxtAccno.Text, TxtAccType.Text);
                 if (checkprintstatus != "1")
                 {
                     DataTable DT = new DataTable();
                     DT = AST.GetCustName(TxtAccType.Text, TxtAccno.Text, TxtBRCD.Text);
                     if (DT.Rows.Count > 0)
                     {
                         TxtAccHName.Text = DT.Rows[0]["CustName"].ToString();
                     }
                 }
                 else
                 {
                     DataTable DT = new DataTable();
                     DT = AST.GetCustName(TxtAccType.Text, TxtAccno.Text, TxtBRCD.Text);
                     if (DT.Rows.Count > 0)
                     {
                         TxtAccHName.Text = DT.Rows[0]["CustName"].ToString();
                     }
                     btnFrntPrint.Visible = false;
                     TextReport.Visible   = true;
                 }
             }
         }
         else
         {
             WebMsgBox.Show("Enter Branch Code First....!", this.Page);
             TxtAccno.Text = "";
             TxtBRCD.Focus();
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
         //Response.Redirect("FrmLogin.aspx", true);
     }
 }
Esempio n. 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            TxtBRCD.Text   = Session["BRCD"].ToString();
            TxtBrname.Text = CS.getbrname(Session["BRCD"].ToString());

            TxtAccType.Focus();
        }
        ScriptManager.GetCurrent(this).AsyncPostBackTimeout = 900000;
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         TxtFDate.Text  = Session["EntryDate"].ToString();
         TxtBRCD.Text   = Session["BRCD"].ToString();
         TxtBrname.Text = AST.GetBranchName(TxtBRCD.Text);
         BindGrid();
         BindProduct(ddlProductName);
         TxtAccType.Focus();
         ViewState["Flag"] = "AD";
     }
 }
Esempio n. 10
0
 protected void Submit_Click(object sender, EventArgs e)
 {
     try
     {
         if (TxtBRCD.Text.ToString() == "")
         {
             TxtBRCD.Focus();
             WebMsgBox.Show("Enter branch code first ...!!", this.Page);
             return;
         }
         else if (TxtAccType.Text.ToString() == "")
         {
             TxtAccType.Focus();
             WebMsgBox.Show("Enter agent code first ...!!", this.Page);
             return;
         }
         else if (txtMonth.Text.ToString() == "")
         {
             txtMonth.Focus();
             WebMsgBox.Show("Enter selected month first ...!!", this.Page);
             return;
         }
         else if (txtYear.Text.ToString() == "")
         {
             txtYear.Focus();
             WebMsgBox.Show("Enter selected year first ...!!", this.Page);
             return;
         }
         else
         {
             DT = CS.GetAllData(TxtBRCD.Text.ToString(), TxtAccType.Text.ToString(), txtMonth.Text.ToString(), txtYear.Text.ToString());
             if (DT.Rows.Count > 0)
             {
                 divGridDetails.Visible = true;
                 GrdDaily.DataSource    = DT;
                 GrdDaily.DataBind();
             }
             else
             {
                 divGridDetails.Visible = false;
                 GrdDaily.DataSource    = null;
                 GrdDaily.DataBind();
             }
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
    protected void TxtAccType_TextChanged(object sender, EventArgs e)
    {
        try
        {
            if (TxtAccType.Text == "")
            {
                TxtAcctypeName.Text = "";
                TxtAccNo.Focus();
                goto ext;
            }
            int    result = 0;
            string GlS1;
            int.TryParse(TxtAccType.Text, out result);
            TxtAcctypeName.Text = customcs.GetProductName(result.ToString(), Session["BRCD"].ToString());
            GlS1 = BD.GetAccTypeGL(TxtAccType.Text, Session["BRCD"].ToString());
            if (GlS1 != null)
            {
                string[] GLS = GlS1.Split('_');
                ViewState["GL"]        = GLS[1].ToString();
                AutoAccname.ContextKey = Session["BRCD"].ToString() + "_" + TxtAccType.Text + "_" + ViewState["GL"].ToString();
                int GL = 0;
                int.TryParse(ViewState["GL"].ToString(), out GL);
                TxtAccNo.Focus();
            }
            else
            {
                WebMsgBox.Show("Enter Valid Product code!....", this.Page);
                TxtAccType.Text     = "";
                TxtAcctypeName.Text = "";
                TxtAccType.Focus();
            }

            ext :;
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
            //Response.Redirect("FrmLogin.aspx", true);
        }
    }
Esempio n. 12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!IsPostBack)
         {
             string YEAR = "";
             TextReport.Visible = false;
             //DateTime DT = Convert.ToDateTime(Convert.ToDateTime(Session["EntryDate"].ToString()).ToString("dd/MM/yyyy"));
             YEAR = DateTime.Now.Date.Year.ToString();//DT.Year.ToString();
             autoglname.ContextKey = Session["BRCD"].ToString();
             TxtBRCD.Text          = Session["BRCD"].ToString();
             TxtBrname.Text        = AST.GetBranchName(TxtBRCD.Text);
             TxtAccType.Focus();
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
         //Response.Redirect("FrmLogin.aspx", true);
     }
 }
Esempio n. 13
0
 protected void btnReport_Click(object sender, EventArgs e)
 {
     try
     {
         if (TxtBRCD.Text.ToString() == "")
         {
             TxtBRCD.Focus();
             WebMsgBox.Show("Enter branch code first ...!!", this.Page);
             return;
         }
         else if (TxtAccType.Text.ToString() == "")
         {
             TxtAccType.Focus();
             WebMsgBox.Show("Enter agent code first ...!!", this.Page);
             return;
         }
         else if (txtMonth.Text.ToString() == "")
         {
             txtMonth.Focus();
             WebMsgBox.Show("Enter selected month first ...!!", this.Page);
             return;
         }
         else if (txtYear.Text.ToString() == "")
         {
             txtYear.Focus();
             WebMsgBox.Show("Enter selected year first ...!!", this.Page);
             return;
         }
         else
         {
             string redirectURL = "FrmReportViewer.aspx?BC=" + TxtBRCD.Text + "&AC=" + TxtAccType.Text + "&Month=" + txtMonth.Text + "&Year=" + txtYear.Text + "&rptname=RptAVS5111.rdlc";
             ScriptManager.RegisterStartupScript(Page, Page.GetType(), "popup", "window.open('" + redirectURL + "','_blank')", true);
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
    protected void TxtCheqNo_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string CHCNT = "";
            string FL    = "";
            if (DdlReturnType.SelectedValue == "1")
            {
                FL = "I";
            }
            else if (DdlReturnType.SelectedValue == "2")
            {
                FL = "O";
            }

            //CHCNT = RI.GetChqCount(Session["BRCD"].ToString(), TxtCheqNo.Text, FL, Session["EntryDate"].ToString(),"","","CH");
            //if (Convert.ToInt32(CHCNT) <= 0)
            //{
            DataTable DT = new DataTable();
            DT = RI.GetInfo(Session["BRCD"].ToString(), DdlReturnType.SelectedValue.ToString(), TxtAccType.Text, TxtAccNo.Text, TxtCheqNo.Text, TxtCheqDate.Text, Session["EntryDate"].ToString());
            if (DT.Rows.Count > 0)
            {
                TxtAccType.Text = DT.Rows[0]["PRDUCT_CODE"].ToString();
                TxtAccNo.Text   = DT.Rows[0]["ACC_NO"].ToString();
                if (TxtAccType.Text != null)
                {
                    TxtAcctypeName.Text = customcs.GetProductName(TxtAccType.Text, Session["BRCD"].ToString());
                }

                if (TxtAccNo.Text != null)
                {
                    string[] CN;
                    CN = customcs.GetAccountName(TxtAccNo.Text.ToString(), TxtAccType.Text, Session["BRCD"].ToString()).Split('_');
                    ViewState["CUSTNO"] = CN[0].ToString();
                    TxtAccName.Text     = CN[1].ToString();
                    Photo_Sign();
                }
                TxtBankCD.Text        = DT.Rows[0]["BANK_CODE"].ToString();
                TxtBankName.Text      = DT.Rows[0]["BankName"].ToString();
                TxtBRCD.Text          = DT.Rows[0]["BRANCH_CODE"].ToString();
                TxtBRCDName.Text      = DT.Rows[0]["BranchName"].ToString();
                TxtNarration.Text     = DT.Rows[0]["PARTICULARS"].ToString();
                TxtCheqDate.Text      = DT.Rows[0]["INSTRUDATE"].ToString().Replace("12:00:00", "");
                TxtCheqNo.Text        = DT.Rows[0]["INSTRU_NO"].ToString();
                TxtCAmount.Text       = DT.Rows[0]["INSTRU_AMOUNT"].ToString();
                ViewState["CUSTNO"]   = DT.Rows[0]["CUSTNO"].ToString();
                ViewState["CUSTNAME"] = DT.Rows[0]["CUSTNAME"].ToString();
                NEWENDN(false);
                Photo_Sign();     ////added by ankita on 20/07/2017
                DdlReason.Focus();
            }

            else
            {
                WebMsgBox.Show("A/C No. and A/C Type Needed.........", this.Page);
                TxtAccType.Focus();
                NEWENDN(true);
            }
            //}
            //else
            //{
            //    WebMsgBox.Show("Chq No. " + TxtCheqNo.Text + " is Already Returned...! ", this.Page);
            //    Clear();
            //    DdlReturnType.Focus();

            //}
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }