Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.UrlReferrer == null)
            {
                base.AutoRedirect();
            }
            if (!IsPostBack)
            {
                ddlDateRange.Focus();
                Datefrom.Attributes.Add("onkeypress", "return notAllowAnything(event);");
                txtDateTo.Attributes.Add("onkeypress", "return notAllowAnything(event);");

                this.BindDateRange(); this.BindCityFrom(); this.bindsender();
                this.ddlDateRange_SelectedIndexChanged(sender, e);

                PurchaseBillDAL Obj           = new PurchaseBillDAL();
                DateTime?       datefromValue = null;
                DateTime?       dateToValue   = null;
                datefromValue       = Convert.ToDateTime(ApplicationFunction.mmddyyyy(Datefrom.Text));
                dateToValue         = Convert.ToDateTime(ApplicationFunction.mmddyyyy(txtDateTo.Text));
                lblTotalRecord.Text = "T. Record (s): " + Obj.Select_PurchaseBillCount(Convert.ToInt32(ddlDateRange.SelectedValue), datefromValue, dateToValue);
                prints.Visible      = false;
            }
        }