Пример #1
0
 protected void btnDel_Click(object sender, System.EventArgs e)
 {
     System.Collections.Generic.List <string> list = new System.Collections.Generic.List <string>();
     if (this.hfldIdsChecked.Value.Contains('['))
     {
         list = JsonHelper.GetListFromJson(this.hfldIdsChecked.Value);
     }
     else
     {
         list.Add(this.hfldIdsChecked.Value);
     }
     try
     {
         foreach (string current in list)
         {
             EquShipRefuelApply byId = this.refuelApplySer.GetById(current);
             this.refuelApplySer.Delete(byId);
         }
         base.RegisterScript("top.ui.show('删除成功!');");
         this.BindGV();
     }
     catch
     {
         base.RegisterScript("top.ui.show('删除失败!');");
     }
 }
Пример #2
0
 private void BindRefurlApply()
 {
     if (this.action == "edit")
     {
         EquShipRefuelApply byId = this.refuelApplySer.GetById(this.id);
     }
 }
Пример #3
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);
         EquShipRefuelApply byId = this.refuelApplySer.GetById(this.id);
     }
 }
Пример #4
0
 protected void btnSave_Click(object sender, System.EventArgs e)
 {
     try
     {
         System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
         if (this.action == "add")
         {
             this.refuelApplySer.Add(this.GetModel(null));
             stringBuilder.Append("top.ui.show('添加成功');").Append(System.Environment.NewLine);
         }
         else
         {
             EquShipRefuelApply byId = this.refuelApplySer.GetById(this.id);
             this.refuelApplySer.Update(this.GetModel(byId));
             stringBuilder.Append("top.ui.show('编辑成功');").Append(System.Environment.NewLine);
         }
         stringBuilder.Append("winclose('RefuelApplyEdit', 'RefuelApplyList.aspx', true)");
         base.RegisterScript(stringBuilder.ToString());
     }
     catch
     {
         base.RegisterScript("top.ui.show('保存失败!')");
     }
 }
Пример #5
0
 private EquShipRefuelApply GetModel(EquShipRefuelApply model)
 {
     return(model);
 }