示例#1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["UserName"] == null)
         {
             Response.Redirect("FrmLogin.aspx");
         }
         TxtBrID.Text = Session["BRCD"].ToString();
         //BindBranch();
         //TxtFDT.Text = Session["EntryDate"].ToString();
         //added by ankita 07/10/2017 to make user frndly
         txtFromDate.Text = conn.sExecuteScalar("select '01/04/'+ convert(varchar(10),(year(dateadd(month, -3,'" + conn.ConvertDate(Session["EntryDate"].ToString()) + "'))))");
         txtToDate.Text   = Session["EntryDate"].ToString();
         TxtFDT.Text      = Session["EntryDate"].ToString();
         if (cmn.MultiBranch(Session["LOGINCODE"].ToString()) != "Y")
         {
             TxtBrID.Enabled = false;
             txtFromDate.Focus();
         }
         else
         {
             TxtBrID.Enabled = true;
             TxtBrID.Focus();
         }
         rdbLangSelection.SelectedItem.Attributes.CssStyle.Add("Color", "Green");
     }
     rdbLangSelection.SelectedItem.Attributes.CssStyle.Add("Color", "Green");
 }
示例#2
0
 protected void TxtBrID_TextChanged(object sender, EventArgs e)
 {
     try
     {
         if (TxtBrID.Text.Trim().ToString() == "0000")
         {
             txtBrName.Text = "All Branch";
             TxtOnDate.Focus();
         }
         else
         {
             txtBrName.Text = DD.GetBranchName(TxtBrID.Text);
             if (txtBrName.Text.Trim().ToString() == "")
             {
                 TxtBrID.Text = "";
                 TxtBrID.Focus();
             }
             else
             {
                 TxtOnDate.Focus();
             }
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["UserName"] == null)
            {
                Response.Redirect("FrmLogin.aspx");
            }
            //added by ankita 07/10/2017 to make user frndly
            //DateTime date = Convert.ToDateTime(Session["EntryDate"].ToString());
            //date = new DateTime(date.Year, date.Month, 1);
            //txtFromDate.Text = date.ToString("dd/MM/yyyy");
            //txtToDate.Text = Session["EntryDate"].ToString();
            //TxtFDT.Text = Session["EntryDate"].ToString();
            TxtBrID.Text = Session["BRCD"].ToString();
            if (cmn.MultiBranch(Session["LOGINCODE"].ToString()) != "Y")
            {
                TxtBrID.Enabled = false;
                txtFromDate.Focus();
            }
            else
            {
                TxtBrID.Enabled = true;
                TxtBrID.Focus();
            }

            TxtFDT.Text      = Convert.ToString(Session["EntryDate"]);
            txtFromDate.Text = Convert.ToString(Session["EntryDate"]);
            Func <string, string> GetEndOfMonth = (CurrentMonth) => {
                return(conn.sExecuteScalar("select Convert(Varchar(10),dateadd(month,1+datediff(month,0,'" + conn.ConvertDate(CurrentMonth) + "' ),-1),103)"));
            };
            txtToDate.Text         = GetEndOfMonth(TxtFDT.Text);
            txtCurrentLang.Visible = CurrentLangHide(0);
        }
    }
示例#4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                if (Session["UserName"] == null)
                {
                    Response.Redirect("FrmLogin.aspx");
                }

                TxtBrID.Focus();
                //added by ankita 07/10/2017 to make user frndly
                TxtBrID.Text  = Session["BRCD"].ToString();
                TxtFDate.Text = conn.sExecuteScalar("select '01/04/'+ convert(varchar(10),(year(dateadd(month, -3,'" + conn.ConvertDate(Session["EntryDate"].ToString()) + "'))))");
                TxtTDate.Text = Session["EntryDate"].ToString();
                if (cmn.MultiBranch(Session["LOGINCODE"].ToString()) != "Y")
                {
                    TxtBrID.Enabled = false;
                    TxtFDate.Focus();
                }
                else
                {
                    TxtBrID.Enabled = true;
                    TxtBrID.Focus();
                }
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["UserName"] == null)
     {
         Response.Redirect("FrmLogin.aspx");
     }
     if (!IsPostBack)
     {
         //added by ankita 07/10/2017 to make user frndly
         //DateTime dateI = Convert.ToDateTime(Session["EntryDate"].ToString());
         //dateI = new DateTime(dateI.Year, dateI.Month, 1);
         TxtFDate.Text = Conn.sExecuteScalar("select '01/04/'+ convert(varchar(10),(year(dateadd(month, -3,'" + Conn.ConvertDate(Session["EntryDate"].ToString()) + "'))))");
         TxtTDate.Text = Session["EntryDate"].ToString();
         TxtBrID.Text  = Session["BRCD"].ToString();
         if (cmn.MultiBranch(Session["LOGINCODE"].ToString()) != "Y")
         {
             TxtBrID.Enabled = false;
             TxtFDate.Focus();
         }
         else
         {
             TxtBrID.Enabled = true;
             TxtBrID.Focus();
         }
     }
 }
 protected void ClearAll()
 {
     try
     {
         TxtBrID.Text  = Session["BRCD"].ToString();
         TxtFDate.Text = "";
         TxtTDate.Text = "";
         TxtBrID.Focus();
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
示例#7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["UserName"] == null)
         {
             Response.Redirect("FrmLogin.aspx");
         }
         TxtBrID.Focus();
         //added by ankita 07/10/2017 to make user frndly
         TxtBrID.Text   = Session["BRCD"].ToString();
         txtBrName.Text = DD.GetBranchName(TxtBrID.Text);
         TxtOnDate.Text = Session["EntryDate"].ToString();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["UserName"] == null)
         {
             Response.Redirect("FrmLogin.aspx");
         }
         BD.BindSHRActivtyALLType(ddlAppType);
         //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();
         TxtBrID.Text   = Session["BRCD"].ToString();
         txtBrName.Text = SA.GetBranchName(TxtBrID.Text);
         TxtBrID.Focus();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["UserName"] == null)
         {
             Response.Redirect("FrmLogin.aspx");
         }
         TxtBrID.Text     = Session["BRCD"].ToString();
         TxtAsonDate.Text = Session["EntryDate"].ToString();
         if (cmn.MultiBranch(Session["LOGINCODE"].ToString()) != "Y")
         {
             TxtBrID.Enabled = false;
             TxtAsonDate.Focus();
         }
         else
         {
             TxtBrID.Enabled = true;
             TxtBrID.Focus();
         }
     }
 }