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

            db.ExecSqlStatement(deleteStr);
        }
Exemplo n.º 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()}'");
 }