예제 #1
0
        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());
        }
예제 #2
0
 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);
     });
 }
예제 #3
0
        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);
            }
        }
예제 #4
0
        internal void DeletePlanDefineScope(string planDefineID)
        {
            string deleteStr = $@"Delete from plandefineallocation where plandefineid = '{planDefineID}' and tenantid = '{Utils.GetTenantId()}'";

            db.ExecSqlStatement(deleteStr);
        }
예제 #5
0
 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()}'");
 }