private void SetDate()
        {
            //    if (ddldateRange.SelectedIndex != -1)
            //    {
            //        Int32 intyearid = Convert.ToInt32(ddldateRange.SelectedValue);
            //        FinYearDAL objDAL = new FinYearDAL();
            //        var lst = objDAL.FilldateFromTo(intyearid);
            //        if (lst != null && lst.Count > 0)
            //        {
            //            hidmindate.Value = string.IsNullOrEmpty(Convert.ToString(DataBinder.Eval(lst[0], "StartDate"))) ? "" : Convert.ToString(Convert.ToDateTime(DataBinder.Eval(lst[0], "StartDate")).ToString("dd-MM-yyyy"));
            //            hidmaxdate.Value = string.IsNullOrEmpty(Convert.ToString(DataBinder.Eval(lst[0], "EndDate"))) ? "" : Convert.ToString(Convert.ToDateTime(DataBinder.Eval(lst[0], "EndDate")).ToString("dd-MM-yyyy"));
            //            if (Convert.ToDateTime(ApplicationFunction.mmddyyyy(hidmaxdate.Value)) >= DateTime.Now.Date && DateTime.Now.Date >= Convert.ToDateTime(ApplicationFunction.mmddyyyy(hidmindate.Value)))
            //            {

            //                txtInvcDatefrom.Text = Convert.ToString(hidmindate.Value);

            //                txtInvcDateto.Text = DateTime.Now.Date.ToString("dd-MM-yyyy");
            //            }
            //            else
            //            {
            //                txtInvcDatefrom.Text = Convert.ToString(hidmindate.Value);
            //                txtInvcDateto.Text = Convert.ToString(hidmaxdate.Value);
            //            }
            //        }
            //    }
            BindDropdownDAL obj  = new BindDropdownDAL();
            Array           list = obj.BindDate();

            txtInvcDatefrom.Text = Convert.ToString(list.GetValue(0));
            txtInvcDateto.Text   = Convert.ToString(list.GetValue(1));
        }
예제 #2
0
        private void SetDate()
        {
            BindDropdownDAL obj  = new BindDropdownDAL();
            Array           list = obj.BindDate();

            txtReceiptDatefrom.Text = Convert.ToString(list.GetValue(0));
            txtReceiptDateto.Text   = Convert.ToString(list.GetValue(1));
        }
예제 #3
0
 private void SetDate()
 {
     if (ddldateRange.SelectedIndex != -1)
     {
         Int32      intyearid = Convert.ToInt32(ddldateRange.SelectedValue);
         FinYearDAL objDAL    = new FinYearDAL();
         var        lst       = objDAL.FilldateFromTo(intyearid);
         hidmindate.Value = string.IsNullOrEmpty(Convert.ToString(DataBinder.Eval(lst[0], "StartDate"))) ? "" : Convert.ToString(Convert.ToDateTime(DataBinder.Eval(lst[0], "StartDate")).ToString("dd-MM-yyyy"));
         hidmaxdate.Value = string.IsNullOrEmpty(Convert.ToString(DataBinder.Eval(lst[0], "EndDate"))) ? "" : Convert.ToString(Convert.ToDateTime(DataBinder.Eval(lst[0], "EndDate")).ToString("dd-MM-yyyy"));
         if (Convert.ToDateTime(ApplicationFunction.mmddyyyy(hidmaxdate.Value)) >= DateTime.Now.Date && DateTime.Now.Date >= Convert.ToDateTime(ApplicationFunction.mmddyyyy(hidmindate.Value)))
         {
             BindDropdownDAL obj  = new BindDropdownDAL();
             Array           list = obj.BindDate();
             txtReceiptDatefrom.Text = Convert.ToString(list.GetValue(0));
             txtReceiptDateto.Text   = Convert.ToString(list.GetValue(1));
         }
         else
         {
             txtReceiptDatefrom.Text = Convert.ToString(hidmindate.Value);
             txtReceiptDateto.Text   = Convert.ToString(hidmaxdate.Value);
         }
     }
 }