Beispiel #1
0
    public void InitPageParameter(int customerScheduleId)
    {
        if (customerScheduleId > 0)
        {
            this.customerSchedule = TheCustomerScheduleMgr.LoadCustomerSchedule(customerScheduleId, true);

            this.tbFlow1.Text    = customerSchedule.Flow;
            this.tbFlow1.Visible = true;
            this.tbFlow.Visible  = false;

            this.tbScheduleNo.Text     = customerSchedule.ReferenceScheduleNo;
            this.tbScheduleNo.ReadOnly = true;
            this.trTemplate.Visible    = false;
        }
        else
        {
            this.customerSchedule = null;


            this.tbFlow.Visible  = true;
            this.tbFlow.Text     = string.Empty;
            this.tbFlow1.Visible = false;

            this.tbScheduleNo.ReadOnly = false;
            this.tbScheduleNo.Text     = string.Empty;


            this.trTemplate.Visible = true;
        }
        this.GVDataBind();
    }
Beispiel #2
0
 protected void btnRelease_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.customerSchedule != null && this.customerSchedule.Id > 0)
         {
             TheCustomerScheduleMgr.ReleaseCustomerSchedule(this.customerSchedule.Id, this.CurrentUser.Code);
             this.customerSchedule = TheCustomerScheduleMgr.LoadCustomerSchedule(this.customerSchedule.Id, true);
             ShowSuccessMessage("MRP.Schedule.Release.Successfully");
             this.backClickEvent(this, e);
         }
     }
     catch (BusinessErrorException ex)
     {
         ShowErrorMessage(ex);
     }
 }
Beispiel #3
0
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         CustomerSchedule customerSchedule = TheCustomerScheduleMgr.LoadCustomerSchedule(this.customerSchedule.Id, true);
         TheCustomerScheduleMgr.DeleteCustomerSchedule(customerSchedule);
         this.backClickEvent(this, e);
         ShowSuccessMessage("MRP.Schedule.Delete.Successfully");
     }
     catch (BusinessErrorException ex)
     {
         ShowErrorMessage(ex);
     }
     catch (Exception)
     {
         ShowErrorMessage("MRP.Schedule.Delete.Fail");
     }
 }