Exemple #1
0
 protected void btnSave_Click(object sender, System.EventArgs e)
 {
     try
     {
         System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
         if (this.action == "add")
         {
             this.reportSer.Add(this.GetModel(null));
             this.SaveStocks();
             stringBuilder.Append("top.ui.show('添加成功');").Append(System.Environment.NewLine);
         }
         else
         {
             EquRepairReport byId = this.reportSer.GetById(this.id);
             this.reportSer.Update(this.GetModel(byId));
             this.SaveStocks();
             stringBuilder.Append("top.ui.show('编辑成功');").Append(System.Environment.NewLine);
         }
         stringBuilder.Append("winclose('RepairReportEdit', 'RepairReportList.aspx?equipmentType=" + this.equipmentType + "', true)");
         base.RegisterScript(stringBuilder.ToString());
     }
     catch
     {
         base.RegisterScript("top.ui.show('保存失败!')");
     }
 }
Exemple #2
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!base.IsPostBack)
     {
         this.lblPrintDate.Text   = System.DateTime.Now.ToString("yyyy-MM-dd");
         this.lblBllProducer.Text = WebUtil.GetUserNames(base.UserCode);
         EquRepairReport byId = this.reportSer.GetById(this.id);
         this.BindGV();
     }
 }
Exemple #3
0
    private void BindReport()
    {
        if (this.action == "edit")
        {
            EquRepairReport byId = this.reportSer.GetById(this.id);
            if (byId != null)
            {
            }
        }
        else
        {
            this.hfldRepairId.Value = System.Guid.NewGuid().ToString();
        }
        DataTable repairStock = this.stockSer.GetRepairStock(this.id, string.Empty, string.Empty, 0, 0);

        this.ViewState["Stock"]     = repairStock;
        this.FileUpload1.RecordCode = this.hfldRepairId.Value;
        this.BindGV();
    }
Exemple #4
0
 private EquRepairReport GetModel(EquRepairReport model)
 {
     return(model);
 }