public void DeletePlanDynamic(List <string> planDynamicIDs) { StringBuilder sqlBuilder = new StringBuilder(100); sqlBuilder.Append("delete from plandefinedynamic where id in ("); int count = planDynamicIDs.Count; for (int i = 0; i < count; i++) { sqlBuilder.Append("{" + i + "},"); } sqlBuilder.Remove(sqlBuilder.Length - 1, 1); sqlBuilder.Append(")"); var sql = sqlBuilder.ToString(); db.ExecSqlStatement(sql, planDynamicIDs.ToArray()); }
internal void AddMyPeriodSets(List <string> periodSetIDList) { if (periodSetIDList == null || periodSetIDList.Count < 1) { return; } // 如果只选了默认周期集,就不用保存了 if (periodSetIDList.Count == 1 && periodSetIDList[0].ToLower().Equals("default")) { return; } periodSetIDList.ForEach(periodSetID => { var insertStr = $@"INSERT INTO periodsetallocation(id, periodsetid, tenantid) VALUES ('{Guid.NewGuid().ToString()}', '{periodSetID}', '{Utils.GetTenantId()}');"; db.ExecSqlStatement(insertStr); }); }
internal void PutSuperiorAssessment(List <PlanItem> planItemList) { string updateSql = @"update planitem set assessmentofsuperior={0},assessmentofsuperiorscore={1} where id={2}"; foreach (PlanItem planItem in planItemList) { db.ExecSqlStatement(updateSql, planItem.AssessmentOfSuperior, planItem.AssessmentScoreOfSuperior, planItem.ID); } }
internal void DeletePlanDefineScope(string planDefineID) { string deleteStr = $@"Delete from plandefineallocation where plandefineid = '{planDefineID}' and tenantid = '{Utils.GetTenantId()}'"; db.ExecSqlStatement(deleteStr); }
internal void UpdateWorkReportBaseInfo(WorkReport workReport) { //更新一条记录 db.ExecSqlStatement($@"update WorkReport set dateoffilling = '{workReport.DateOfFilling.ToString("yyyy-MM-dd HH:mm:ss")}', lastmodifier='{ Utils.GetUserId()}',lastmodifiedtime={db.DBDataTimeFunc} where id='{workReport.ID}' and tenantid='{Utils.GetTenantId()}'"); }