/// <summary> /// 添加WLOGWeekSummary表行数据(如主键为非自增型字段,则自行修改代码) /// </summary> /// <param name="wlogweeksummarydata">数据集对象</param> /// <param name="wlogweeksummary">实体对象</param> public void AddRow(ref WLOGWeekSummaryData wlogweeksummarydata, EntityWLOGWeekSummary wlogweeksummary) { #region DataRow dr = wlogweeksummarydata.Tables[0].NewRow(); wlogweeksummary.summaryId = this._wlogweeksummaryclass.GetMaxAddOne(wlogweeksummarydata).ToString(); wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.summaryId, wlogweeksummary.summaryId); wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.writeUser, wlogweeksummary.writeUser); wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.startDate, wlogweeksummary.startDate); wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.endDate, wlogweeksummary.endDate); wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.weekBH, wlogweeksummary.weekBH); wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.submited, wlogweeksummary.submited); wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.submitTime, wlogweeksummary.submitTime); wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.writeTime, wlogweeksummary.writeTime); wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.writeIp, wlogweeksummary.writeIp); wlogweeksummarydata.Tables[0].Rows.Add(dr); #endregion }
/// <summary> /// 编辑wlogweeksummarydata数据集中指定的行数据 /// </summary> /// <param name="wlogweeksummarydata">数据集对象</param> /// <param name="wlogweeksummary">实体对象</param> public void EditRow(ref WLOGWeekSummaryData wlogweeksummarydata, EntityWLOGWeekSummary wlogweeksummary) { #region if (wlogweeksummarydata.Tables[0].Rows.Count <= 0) { wlogweeksummarydata = this.getData(wlogweeksummary.summaryId); } DataRow dr = wlogweeksummarydata.Tables[0].Rows.Find(new object[1] { wlogweeksummary.summaryId }); wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.summaryId, wlogweeksummary.summaryId); wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.writeUser, wlogweeksummary.writeUser); wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.startDate, wlogweeksummary.startDate); wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.endDate, wlogweeksummary.endDate); wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.weekBH, wlogweeksummary.weekBH); wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.submited, wlogweeksummary.submited); wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.submitTime, wlogweeksummary.submitTime); wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.writeTime, wlogweeksummary.writeTime); wlogweeksummarydata.Assign(dr, WLOGWeekSummaryData.writeIp, wlogweeksummary.writeIp); #endregion }