public string UpdateMissionSummaryId(string oldMisssionsId, string newMissionsId, string summaryId) { #region int totalCount = 0; PageParams pageparams = new PageParams(); DBConditions querybusinessparams = new DBConditions(pageparams); querybusinessparams.Or(WLOGMissionData.missionId, EnumSqlType.sqlint, EnumCondition.InValues, oldMisssionsId); querybusinessparams.Or(WLOGMissionData.missionId, EnumSqlType.sqlint, EnumCondition.InValues, newMissionsId); WLOGMissionData missiondata = new WLOGMissionData(); totalCount = this._wlogmissionclass.GetSingleT(missiondata, querybusinessparams); string[] oldmissionid = oldMisssionsId.Split(','); string[] newmissionid = newMissionsId.Split(','); DataRow dr; for (int i = 0; i < oldmissionid.Length; i++) { if (oldmissionid[i] != "") { dr = missiondata.Tables[0].Rows.Find(oldmissionid[i]); missiondata.Assign(dr, WLOGMissionData.summaryId, ""); } } for (int i = 0; i < newmissionid.Length; i++) { if (newmissionid[i] != "") { dr = missiondata.Tables[0].Rows.Find(newmissionid[i]); missiondata.Assign(dr, WLOGMissionData.summaryId, summaryId); } } return(this.SaveWLOGMission(missiondata)); #endregion }
/// <summary> /// 添加WLOGMission表行数据(如主键为非自增型字段,则自行修改代码) /// </summary> /// <param name="wlogmissiondata">数据集对象</param> /// <param name="wlogmission">实体对象</param> public void AddRow(ref WLOGMissionData wlogmissiondata, EntityWLOGMission wlogmission) { #region DataRow dr = wlogmissiondata.Tables[0].NewRow(); wlogmission.missionId = this._wlogmissionclass.GetMaxAddOne(wlogmissiondata).ToString(); wlogmissiondata.Assign(dr, WLOGMissionData.missionId, wlogmission.missionId); wlogmissiondata.Assign(dr, WLOGMissionData.summaryId, wlogmission.summaryId); wlogmissiondata.Assign(dr, WLOGMissionData.writeUser, wlogmission.writeUser); wlogmissiondata.Assign(dr, WLOGMissionData.projectId, wlogmission.projectId); wlogmissiondata.Assign(dr, WLOGMissionData.missionBH, wlogmission.missionBH); wlogmissiondata.Assign(dr, WLOGMissionData.missionName, wlogmission.missionName); wlogmissiondata.Assign(dr, WLOGMissionData.missionRemark, wlogmission.missionRemark); wlogmissiondata.Assign(dr, WLOGMissionData.planned, wlogmission.planned); wlogmissiondata.Assign(dr, WLOGMissionData.plantimelimit, wlogmission.plantimelimit); wlogmissiondata.Assign(dr, WLOGMissionData.outputResult, wlogmission.outputResult); wlogmissiondata.Assign(dr, WLOGMissionData.startDate, wlogmission.startDate); wlogmissiondata.Assign(dr, WLOGMissionData.reviewState, wlogmission.reviewState); wlogmissiondata.Assign(dr, WLOGMissionData.missionState, wlogmission.missionState); wlogmissiondata.Assign(dr, WLOGMissionData.deleted, wlogmission.deleted); wlogmissiondata.Assign(dr, WLOGMissionData.usable, wlogmission.usable); wlogmissiondata.Assign(dr, WLOGMissionData.updated, wlogmission.updated); wlogmissiondata.Assign(dr, WLOGMissionData.deleteTime, wlogmission.deleteTime); wlogmissiondata.Assign(dr, WLOGMissionData.writeTime, wlogmission.writeTime); wlogmissiondata.Assign(dr, WLOGMissionData.writeIp, wlogmission.writeIp); wlogmissiondata.Tables[0].Rows.Add(dr); #endregion }
/// <summary> /// 编辑wlogmissiondata数据集中指定的行数据 /// </summary> /// <param name="wlogmissiondata">数据集对象</param> /// <param name="wlogmission">实体对象</param> public void EditRow(ref WLOGMissionData wlogmissiondata, EntityWLOGMission wlogmission) { #region if (wlogmissiondata.Tables[0].Rows.Count <= 0) { wlogmissiondata = this.getData(wlogmission.missionId); } DataRow dr = wlogmissiondata.Tables[0].Rows.Find(new object[1] { wlogmission.missionId }); wlogmissiondata.Assign(dr, WLOGMissionData.missionId, wlogmission.missionId); wlogmissiondata.Assign(dr, WLOGMissionData.summaryId, wlogmission.summaryId); wlogmissiondata.Assign(dr, WLOGMissionData.writeUser, wlogmission.writeUser); wlogmissiondata.Assign(dr, WLOGMissionData.projectId, wlogmission.projectId); wlogmissiondata.Assign(dr, WLOGMissionData.missionBH, wlogmission.missionBH); wlogmissiondata.Assign(dr, WLOGMissionData.missionName, wlogmission.missionName); wlogmissiondata.Assign(dr, WLOGMissionData.missionRemark, wlogmission.missionRemark); wlogmissiondata.Assign(dr, WLOGMissionData.planned, wlogmission.planned); wlogmissiondata.Assign(dr, WLOGMissionData.plantimelimit, wlogmission.plantimelimit); wlogmissiondata.Assign(dr, WLOGMissionData.outputResult, wlogmission.outputResult); wlogmissiondata.Assign(dr, WLOGMissionData.startDate, wlogmission.startDate); wlogmissiondata.Assign(dr, WLOGMissionData.reviewState, wlogmission.reviewState); wlogmissiondata.Assign(dr, WLOGMissionData.missionState, wlogmission.missionState); wlogmissiondata.Assign(dr, WLOGMissionData.deleted, wlogmission.deleted); wlogmissiondata.Assign(dr, WLOGMissionData.usable, wlogmission.usable); wlogmissiondata.Assign(dr, WLOGMissionData.updated, wlogmission.updated); wlogmissiondata.Assign(dr, WLOGMissionData.deleteTime, wlogmission.deleteTime); wlogmissiondata.Assign(dr, WLOGMissionData.writeTime, wlogmission.writeTime); wlogmissiondata.Assign(dr, WLOGMissionData.writeIp, wlogmission.writeIp); #endregion }