Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         GobalTools.BindProduct(this.ddlProducts);
     }
 }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         GobalTools.BindProduct(this.cbProductIdValue);
         if (Request.Params["id"] != null)
         {
             ProductDiscountInfo entity = SimpleOrmOperator.Query <ProductDiscountInfo>(Convert.ToInt32(Request.Params["id"]));
             WebFormHelper.SetDataToForm(this, entity);
             this.txtBeginDate.Value = DateTimeHelper.DtToLongString(entity.StartDate);
             this.txtEndDate.Value   = DateTimeHelper.DtToLongString(entity.EndDate);
         }
         else
         {
             this.txtBeginDate.Value = DateTimeHelper.DtToLongString(System.DateTime.Now);
             this.txtEndDate.Value   = DateTimeHelper.DtToLongString(System.DateTime.Now);
         }
     }
 }