コード例 #1
0
ファイル: PrjStageSetAction.cs プロジェクト: zxl881203/src
        public bool Add(PrjStageSetModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("begin ");
            builder.Append(" update OPM_Prj_StageSet set childcount = childcount+1 where StageCode = '" + model.ParentStageCode + "'");
            builder.Append(" and prjid = '" + model.PrjID + "'");
            builder.Append(" insert into OPM_Prj_StageSet(PrjStageID,PrjID,StageCode,ParentStageCode,PrjStageName,Podepom,IsFlow,I_xh,");
            builder.Append("AddUser,AddTime,ReadWrite,Remark,ParentID,ChildCount)");
            builder.Append(" values (");
            builder.Append("'" + model.PrjStageID + "',");
            builder.Append("'" + model.PrjID + "',");
            builder.Append("'" + model.StageCode + "',");
            builder.Append("'" + model.ParentStageCode + "',");
            builder.Append("'" + model.PrjStageName + "',");
            builder.Append("'" + model.Podepom + "',");
            builder.Append("'" + model.IsFlow + "',");
            builder.Append(model.I_xh1 + ",");
            builder.Append("'" + model.AddUser + "',");
            builder.Append("'" + model.AddTime + "',");
            builder.Append("'" + model.ReadWrite + "',");
            builder.Append("'" + model.Remark + "',");
            builder.Append("'" + model.ParentID + "',");
            builder.Append(model.ChildCount);
            builder.Append(")");
            builder.Append(" end");
            return(publicDbOpClass.NonQuerySqlString(builder.ToString()));
        }
コード例 #2
0
ファイル: PrjStageSetAction.cs プロジェクト: zxl881203/src
        public bool Update(PrjStageSetModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("update OPM_Prj_StageSet set ");
            builder.Append("PrjStageName='" + model.PrjStageName + "',");
            builder.Append("IsFlow='" + model.IsFlow + "',");
            builder.Append("ReadWrite='" + model.ReadWrite + "',");
            builder.Append("I_xh=" + model.I_xh1 + ",");
            builder.Append("Remark='" + model.Remark + "'");
            builder.Append(" where PrjStageID='" + model.PrjStageID + "'");
            builder.Append(" and PrjID='" + model.PrjID + "'");
            return(publicDbOpClass.NonQuerySqlString(builder.ToString()));
        }