Esempio n. 1
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         OilFeeReportInfo oInfo = new OilFeeReportInfo();
         string reportID = this.ReportBaseID;
         if (string.IsNullOrEmpty(reportID) == false)
         {
             oInfo = new OilFeeReport().GetByID(reportID);
         }
         oInfo.VoyageID = ddlVoyage.SelectedValue;
         oInfo.ReportTypeID = rblReportType.SelectedValue;
         if (oInfo.ReportTypeID == "3")
         {
             // 财务确认
             oInfo.ApproveUserID = this.UserCacheInfo.ID;
         }
         else
         {
             oInfo.InputUserID = this.UserCacheInfo.ID;
         }
         if (string.IsNullOrEmpty(reportID))
         {
             this.ReportBaseID = new OilFeeReport().Add(oInfo);
             ShowMsg("添加成功。");
         }
         else
         {
             new OilFeeReport().Update(oInfo);
             ShowMsg("更新成功。");
         }
     }
     catch (ArgumentNullException aex)
     {
         ShowMsg(aex.Message);
     }
     catch (Exception ex)
     {
         ShowMsg(ex.Message);
         Log(ex);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 添加费用类别
 /// </summary>
 /// <param name="cInfo">实体</param>
 /// <returns>新增实体的主键</returns>
 public string Add(OilFeeReportInfo cInfo)
 {
     return dal.Add(cInfo);
 }
Esempio n. 3
0
 /// <summary>
 /// 更新费用类别
 /// </summary>
 /// <param name="cInfo">实体</param>
 public void Update(OilFeeReportInfo cInfo)
 {
     if (string.IsNullOrEmpty(cInfo.ID))
     {
         throw new ArgumentNullException("参数ID不能为空。");
     }
     dal.Update(cInfo);
 }
Esempio n. 4
0
 /// <summary>
 /// 添加费用类别
 /// </summary>
 /// <param name="ID">实体主键</param>
 /// <returns></returns>
 public void Delete(string ID)
 {
     OilFeeReportInfo cInfo = new OilFeeReportInfo(ID);
     dal.Delete(cInfo);
 }