Esempio n. 1
0
 protected void btnDelete_ServerClick(object sender, EventArgs e)
 {
     try
     {
         FamilyMbInfo def = new FamilyMbInfo();
         //调用删除方法.
         def.family = HFamily.Value.Trim();
         def.mb = HMBCode.Value.Trim();
         def.remark = HDescr.Value.Trim();
         iFamilyMB.RemoveFamilyMb(def);
     }
     catch (FisException fex)
     {
         showErrorMessage(fex.mErrmsg);
         return;
     }
     catch (System.Exception ex)
     {
         showErrorMessage(ex.Message);
         return;
     }
     showList();
     this.updatePanel2.Update();
     ScriptManager.RegisterStartupScript(this.updatePanel, typeof(System.Object), "saveUpdate", "resetTableHeight();DeleteComplete();HideWait();", true);
 }
Esempio n. 2
0
 protected void btnSave_ServerClick(object sender, EventArgs e)
 {
    
     FamilyMbInfo itcnd = new FamilyMbInfo();
     FamilyMbInfo cond = new FamilyMbInfo();
     cond.family = HFamily.Value.Trim();
     cond.mb = HMBCode.Value.Trim();
     itcnd.family = this.TxtFamily.Text.Trim();
     itcnd.mb = this.txtMBCode.Text.Trim();
     itcnd.remark = this.txtDescr.Text.Trim();
     itcnd.editor = this.HiddenUserName.Value.Trim();
     itcnd.udt = DateTime.Now;
     this.hidhidcol.Value =  this.TxtFamily.Text.Trim() + this.txtMBCode.Text.Trim() ;
     try
     {
         //调用添加的方法 相同的key时需要抛出异常...
         iFamilyMB.UpdateFamilyMb(itcnd, cond);
     }
     catch (FisException fex)
     {
         showErrorMessage(fex.mErrmsg);
         return;
     }
     catch (System.Exception ex)
     {
         showErrorMessage(ex.Message);
         return;
     }
     showList();
     this.updatePanel2.Update();
     ScriptManager.RegisterStartupScript(this.updatePanel, typeof(System.Object), "saveUpdate", "resetTableHeight();SaveUpdateComplete('" + this.hidhidcol.Value + "');HideWait();", true);
 }
Esempio n. 3
0
 protected void btnAdd_ServerClick(object sender, EventArgs e)
 {
     FamilyMbInfo itcnd = new FamilyMbInfo();
     itcnd.family = this.TxtFamily.Text.Trim();
     itcnd.mb = this.txtMBCode.Text.Trim();
     itcnd.remark = this.txtDescr.Text.Trim();
     itcnd.editor = this.HiddenUserName.Value.Trim();
     itcnd.cdt = DateTime.Now;
     itcnd.udt = DateTime.Now;
     string con = itcnd.family + itcnd.mb;
     con = con.Trim();
     try
     {
         //调用添加的方法 相同的key时需要抛出异常...
         iFamilyMB.AddFamilyMb(itcnd);
     }
     catch (FisException fex)
     {
         showErrorMessage(fex.mErrmsg);
         return;
     }
     catch (System.Exception ex)
     {
         showErrorMessage(ex.Message);
         return;
     }
     showList();
     this.updatePanel2.Update();
     ScriptManager.RegisterStartupScript(this.updatePanel, typeof(System.Object), "addUpdate", "resetTableHeight();AddUpdateComplete(\"" + con + "\");HideWait();", true);
 }
Esempio n. 4
0
 public void AddFamilyMb(FamilyMbInfo item)
 {
     try
     {
         MBRepository.AddFamilyMbInfo(item);
     }
     catch (Exception ee)
     {
         logger.Error(ee.Message);
         throw ee;
     }
 }
Esempio n. 5
0
 public void UpdateFamilyMb(FamilyMbInfo item, FamilyMbInfo cond)
 {
     try
     {
         MBRepository.ModifyFamilyMbInfo(item, cond);
     }
     catch (Exception ee)
     {
         logger.Error(ee.Message);
         throw ee;
     }
 }
Esempio n. 6
0
 public IList<FamilyMbInfo> GetAllFamilyMbItems()
 {
     IList<FamilyMbInfo> dataLst = new List<FamilyMbInfo>();
     try
     {
         FamilyMbInfo condition = new FamilyMbInfo();
         dataLst = MBRepository.GetFamilyMbInfoList(condition);
     }
     catch (Exception ee)
     {
         logger.Error(ee.Message);
         throw ee;
     }
     return dataLst;
 }