protected void Page_Load(object sender, EventArgs e)
        {
            UCProductSearch1.ParentPage = this;

            UC_FromDate.DateIsRequired(true, "Save", "Please select Start Date");
            UC_FromDate.startdate(DateTime.Now);
            UC_ToDate.DateIsRequired(false, "x", "");
            UC_ToDate.startdate(DateTime.Now);
            sessionID = Session.SessionID;
            UCFormHeader1.FormHeaderText = "Discount Master";
            TextBox txtstartdate = (TextBox)UC_FromDate.FindControl("txtDate");
            TextBox txtenddate   = (TextBox)UC_ToDate.FindControl("txtDate");

            txtstartdate.Attributes.Add("onchange", "validateDate('" + txtstartdate.ClientID + "','" + txtenddate.ClientID + "','Start'),'From Date Should Not Be Less Than End Date'");
            txtenddate.Attributes.Add("onchange", "validateDate('" + txtstartdate.ClientID + "','" + txtenddate.ClientID + "','End','To Date Should Be Greater Than Start Date')");
            if (!IsPostBack)
            {
                BindMainGrid();
                hdnDiscountID.Value = "";
            }
            this.UCToolbar1.ToolbarAccess("DiscountMaster");
            this.UCToolbar1.evClickAddNew += pageAddNew;
            this.UCToolbar1.evClickSave   += pageSave;
            this.UCToolbar1.evClickClear  += pageClear;
        }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     FillWarehouse();
     UC_FromDate.Date   = DateTime.Now;
     hdnsessionID.Value = Session.SessionID;
     // BulkInsertToDataBase("Product", 9, hdnsessionID.Value);
     if (!IsPostBack)
     {
         txtgridvalues.Text = "";
         DeleteCycleTempData(hdnsessionID.Value);
         UC_FromDate.startdate(DateTime.Now);
         UC_ToDate.startdate(DateTime.Now);
     }
 }