예제 #1
0
 private void BtnOk_Click(object sender, EventArgs e)
 {
     if (TxtFromDate.Text == "  /  /")
     {
         MessageBox.Show("From Date Cannot Left Blank...!", "Mr Solution", MessageBoxButtons.OK, MessageBoxIcon.Information);
         TxtFromDate.Focus();
         return;
     }
     else if (TxtToDate.Text == "  /  /")
     {
         MessageBox.Show("To Date Cannot Left Blank...!", "Mr Solution", MessageBoxButtons.OK, MessageBoxIcon.Information);
         TxtToDate.Focus();
         return;
     }
     ButtonAction = "OK";
     this.Close();
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["UserName"] == null)
            {
                Response.Redirect("FrmLogin.aspx");
            }


            autoglname.ContextKey = Session["BRCD"].ToString();
            TxtToDate.Text        = Session["EntryDate"].ToString();
            TxtBRCD.Text          = Session["BRCD"].ToString();
            TxtBRCDName.Text      = AST.GetBranchName(TxtBRCD.Text);
            TxtFromDate.Focus();
        }
        ScriptManager.GetCurrent(this).AsyncPostBackTimeout = 500000;
    }
예제 #3
0
        private void BtnOk_Click(object sender, EventArgs e)
        {
            if (TxtFromDate.Text == "  /  /")
            {
                MessageBox.Show("From Date Cannot Left Blank...!", "Mr Solution", MessageBoxButtons.OK, MessageBoxIcon.Information);
                TxtFromDate.Focus();
                return;
            }
            else if (TxtToDate.Text == "  /  /")
            {
                MessageBox.Show("To Date Cannot Left Blank...!", "Mr Solution", MessageBoxButtons.OK, MessageBoxIcon.Information);
                TxtToDate.Focus();
                return;
            }

            if (ChkSelectAll.Checked == false)
            {
                TagList frm = new TagList("Report.GeneralledgerList", "Ledger List", "");
                if (TagList.dt.Rows.Count > 0)
                {
                    frm.ShowDialog();
                    for (int i = 0; i < frm.SelectedList.Count; i++)
                    {
                        _LedgerId = _LedgerId + "," + frm.SelectedList[i]["LedgerId"].ToString();
                    }
                }
                else
                {
                    MessageBox.Show("No List Available in Ledger.", "Mr. Solution", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
            }
            else
            {
                _LedgerId = "";
            }

            ButtonAction = "OK";
            this.Close();
        }
 protected void TxtFromDate_TextChanged(object sender, EventArgs e)
 {
     try
     {
         if (TxtToDate.Text != "")
         {
             if (Convert.ToDateTime(Conn.ConvertDate(TxtFromDate.Text)) > Convert.ToDateTime(Conn.ConvertDate(TxtToDate.Text)))
             {
                 WebMsgBox.Show("From Date cannot be greater than To Date....!", this.Page);
                 TxtFromDate.Text = "";
                 TxtFromDate.Focus();
             }
             else
             {
                 TxtToDate.Focus();
             }
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }