/// <summary> /// 向数据表PfmReportRecord修改一条记录 /// </summary> /// <param name="pfmReportRecord">PfmReportRecord实体对象</param> /// <returns></returns> public static int Update(PfmReportRecordMDL pfmReportRecord) { if (pfmReportRecord == null) { return(0); } return(PfmReportRecordBLL._dal.Update(pfmReportRecord)); }
/// <summary> /// 向数据表PfmReportRecord中插入一条新记录 /// </summary> /// <param name="pfmReportRecord">PfmReportRecord实体对象</param> /// <returns></returns> public static int Insert(PfmReportRecordMDL pfmReportRecord) { if (pfmReportRecord == null) { return(0); } return(PfmReportRecordBLL._dal.Insert(pfmReportRecord)); }
/// <summary> /// 保存报表明细数据 /// </summary> /// <param name="rptId">报表编号</param> private void ReportRecordSave(int rptId) { DataTable dt = PfmIaeDetailedBLL.Report(DateBegin, DateEnd); PfmReportRecordMDL recMdl = new PfmReportRecordMDL(); foreach (DataRow dr in dt.Rows) { recMdl.RptId = rptId; recMdl.MbrId = TypeHelper.TypeToInt32(dr["mbr_id"]); recMdl.AccId = TypeHelper.TypeToInt32(dr["acc_id"]); recMdl.RrdAddTime = DateTime.Now; recMdl.RrdInSum = TypeHelper.TypeToDecimal(dr["Incomings"]); recMdl.RrdInCount = TypeHelper.TypeToInt32(dr["InCount"]); recMdl.RrdOutSum = TypeHelper.TypeToDecimal(dr["Outgoings"]); recMdl.RrdOutCount = TypeHelper.TypeToInt32(dr["OutCount"]); recMdl.RrdSum = TypeHelper.TypeToDecimal(dr["Sums"]); PfmReportRecordBLL.Insert(recMdl); } recMdl = null; }
/// <summary> /// 删除数据表PfmReportRecord中的一条记录 /// </summary> /// <param name="pfmReportRecord">PfmReportRecord实体对象</param> /// <returns></returns> public static int Delete(PfmReportRecordMDL pfmReportRecord) { return(PfmReportRecordBLL._dal.Delete(pfmReportRecord)); }