protected void TxtBRCD_TextChanged(object sender, EventArgs e)
 {
     try
     {
         if (TxtBRCD.Text != "")
         {
             string bname = AST.GetBranchName(TxtBRCD.Text);
             if (bname != null)
             {
                 TxtBRCDName.Text = bname;
                 TxtFPRD.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);
     }
 }
Пример #2
0
 protected void TxtAccType_TextChanged(object sender, EventArgs e)
 {
     try
     {
         if (TxtBRCD.Text != "")
         {
             string Glname = "";
             Glname = CS.GetAccType(TxtAccType.Text, TxtBRCD.Text);
             if (Glname != null)
             {
                 TxtATName.Text = Glname.ToString();
             }
             else
             {
                 WebMsgBox.Show("Agent Code Not found....!", this.Page);
             }
             txtMonth.Focus();
         }
         else
         {
             WebMsgBox.Show("Enter Branch Code First....!", this.Page);
             TxtAccType.Text = "";
             TxtBRCD.Focus();
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
    protected void TxtAccType_TextChanged(object sender, EventArgs e)
    {
        try
        {
            if (TxtBRCD.Text != "")
            {
                TxtATName.Text = AST.GetAccType(TxtAccType.Text, TxtBRCD.Text);

                string[] GL = BD.GetAccTypeGL(TxtAccType.Text, TxtBRCD.Text).Split('_');
                TxtATName.Text         = GL[0].ToString();
                ViewState["GL"]        = GL[1].ToString();
                AutoAccname.ContextKey = TxtBRCD.Text + "_" + TxtAccType.Text + "_" + ViewState["GL"].ToString();

                TxtAccno.Focus();
            }
            else
            {
                WebMsgBox.Show("Enter Branch Code First....!", this.Page);
                TxtAccType.Text = "";
                TxtBRCD.Focus();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
            //Response.Redirect("FrmLogin.aspx", true);
        }
    }
 protected void TxtATName_TextChanged(object sender, EventArgs e)
 {
     try
     {
         if (TxtBRCD.Text != "")
         {
             string   custno = TxtATName.Text;
             string[] CT     = custno.Split('_');
             if (CT.Length > 0)
             {
                 TxtATName.Text  = CT[0].ToString();
                 TxtAccType.Text = CT[1].ToString();
                 string[] GLS = BD.GetAccTypeGL(TxtAccType.Text, TxtBRCD.Text).Split('_');
                 ViewState["GL"]        = GLS[1].ToString();
                 AutoAccname.ContextKey = TxtBRCD.Text + "_" + TxtAccType.Text + "_" + ViewState["GL"].ToString();
             }
             TxtAccno.Focus();
         }
         else
         {
             WebMsgBox.Show("Enter Branch Code First....!", this.Page);
             TxtATName.Text = "";
             TxtBRCD.Focus();
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
Пример #5
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 = "";
                    TxtAccno.Text    = "";
                    TxtAccno.Focus();
                }
                else
                {
                    DataTable DT = new DataTable();
                    DT = AST.GetCustName(TxtAccType.Text, TxtAccno.Text, TxtBRCD.Text);
                    if (DT.Rows.Count > 0)
                    {
                        string[] TD = TxtTDate.Text.Split('/');
                        TxtAccHName.Text = DT.Rows[0]["CustName"].ToString();
                        TxtOPDT.Text     = Convert.ToDateTime(DT.Rows[0]["OPENINGDATE"]).ToString("dd/MM/yyyy");
                        //--Abhishek
                        string RES = AST.GetAccStatus(TxtBRCD.Text, TxtAccno.Text, TxtAccType.Text);
                        if (RES == "1")
                        {
                            TxtACStatus.Text = "Active";
                        }
                        else if (RES == "9")
                        {
                            TxtACStatus.Text = "Suit File";
                        }
                        else
                        {
                            TxtACStatus.Text = "Deactive";
                        }
                        TxtClearBal.Text   = OC.GetOpenClose("CLOSING", TD[2].ToString(), TD[1].ToString(), TxtAccType.Text, TxtAccno.Text, Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["GL"].ToString()).ToString();
                        TxtUnClearBal.Text = OC.GetOpenClose("Unclear", TD[2].ToString(), TD[1].ToString(), TxtAccType.Text, TxtAccno.Text, Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["GL"].ToString()).ToString();
                    }

                    TxtFDate.Focus();
                }
            }
            else
            {
                WebMsgBox.Show("Enter Branch Code First....!", this.Page);
                TxtAccno.Text = "";
                TxtBRCD.Focus();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
            //Response.Redirect("FrmLogin.aspx", true);
        }
    }
Пример #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             // Div_Monthly.Visible = false;
             // Div_Daily.Visible = false;
             string YEAR = "";
             //DateTime DT = Convert.ToDateTime(Convert.ToDateTime(Session["EntryDate"].ToString()).ToString("dd/MM/yyyy"));
             YEAR          = DateTime.Now.Date.Year.ToString();//DT.Year.ToString();
             TxtFDate.Text = Session["EntryDate"].ToString();
             TxtTDate.Text = Session["EntryDate"].ToString();
             // Txtdate.Text = Session["EntryDate"].ToString();
             TxtBRCD.Text   = Session["BRCD"].ToString();
             TxtBrname.Text = AST.GetBranchName(TxtBRCD.Text);
             //autoglname.ContextKey = Session["BRCD"].ToString();
             //   autoglname1.ContextKey = Session["BRCD"].ToString();
             TxtBRCD.Focus();
         }
         catch (Exception Ex)
         {
             ExceptionLogging.SendErrorToText(Ex);
         }
     }
 }
Пример #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            try
            {
                if (Session["UserName"] == null)
                {
                    Response.Redirect("FrmLogin.aspx");
                }

                TxtBRCD.Text          = Session["BRCD"].ToString();
                TxtBrname.Text        = AST.GetBranchName(TxtBRCD.Text);
                autoglname.ContextKey = Session["BRCD"].ToString();
                TxtBRCD.Focus();

                TxtFDate.Text = conn.sExecuteScalar("select '01/04/'+ convert(varchar(10),(year(dateadd(month, -3,'" + conn.ConvertDate(Session["EntryDate"].ToString()) + "'))))");
                TxtTDate.Text = Session["EntryDate"].ToString();
            }
            catch (Exception Ex)
            {
                ExceptionLogging.SendErrorToText(Ex);
            }
        }
    }
Пример #8
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);
     }
 }
 protected void ClearData()
 {
     TxtBRCD.Text     = "";
     TxtAccType.Text  = "";
     TxtBrname.Text   = "";
     TxtATName.Text   = "";
     TxtAccno.Text    = "";
     TxtAccHName.Text = "";
     TxtBRCD.Focus();
 }
 public void Clear()
 {
     TxtBRCD.Text     = "";
     TxtBRCDName.Text = "";
     TxtFPRD.Text     = "";
     TxtFPRDName.Text = "";
     TxtTPRD.Text     = "";
     TXtTPRDName.Text = "";
     TxtFAcc.Text     = "";
     TxtTAcc.Text     = "";
     TxtFAccName.Text = "";
     TxtTAccName.Text = "";
     TxtBRCD.Focus();
 }
Пример #11
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 Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            try
            {
                if (Session["UserName"] == null)
                {
                    Response.Redirect("FrmLogin.aspx");
                }

                //added by ankita 07/10/2017 to make user frndly
                TxtFDate.Text = conn.sExecuteScalar("select '01/04/'+ convert(varchar(10),(year(dateadd(month, -3,'" + conn.ConvertDate(Session["EntryDate"].ToString()) + "'))))");
                TxtTDate.Text = Session["EntryDate"].ToString();
                TxtBRCD.Focus();
            }
            catch (Exception Ex)
            {
                ExceptionLogging.SendErrorToText(Ex);
            }
        }
    }
Пример #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 TxtToDate_TextChanged(object sender, EventArgs e)
 {
     try
     {
         if (TxtFromDate.Text != "")
         {
             if (Convert.ToDateTime(Conn.ConvertDate(TxtToDate.Text)) < Convert.ToDateTime(Conn.ConvertDate(TxtFromDate.Text)))
             {
                 WebMsgBox.Show("To Date cannot be greater than From Date....!", this.Page);
                 TxtToDate.Text = "";
                 TxtToDate.Focus();
             }
             else
             {
                 TxtBRCD.Focus();
             }
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
Пример #15
0
 protected void TxtAccType_TextChanged(object sender, EventArgs e)
 {
     try
     {
         if (TxtBRCD.Text != "")
         {
             //  TxtATName.Text = AST.GetAccType(TxtAccType.Text, TxtBRCD.Text);
             //string[] GL = BD.GetAgentType(TxtAccType.Text, TxtBRCD.Text).Split('_');
             //   TxtATName.Text = GL[0].ToString();
             //  ViewState["GL"] = GL[1].ToString();
             TxtFDate.Focus();
         }
         else
         {
             WebMsgBox.Show("Enter Branch Code First....!", this.Page);
             //     TxtAccType.Text = "";
             TxtBRCD.Focus();
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
Пример #16
0
 protected void TxtEffectDate_TextChanged(object sender, EventArgs e)
 {
     TxtBRCD.Focus();
 }