Example #1
0
        public int UpdateDoc(PrjStageInfoModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("Update OPM_Prj_StageInfo SET");
            builder.Append(" InfoCode=");
            builder.Append("'" + model.InfoCode + "',");
            builder.Append("InfoName=");
            builder.Append("'" + model.InfoName + "',");
            builder.Append("InfoContent=");
            builder.Append("'" + model.InfoContent + "',");
            builder.Append("FlowState=");
            builder.Append("-1,");
            builder.Append("IsValid=");
            builder.Append("'" + model.IsValid + "',");
            builder.Append("IsFile=");
            builder.Append("'" + model.IsFile + "',");
            builder.Append("FileType=");
            builder.Append(model.FileType + ",");
            builder.Append("CorpID=");
            builder.Append(model.CorpID + ",");
            builder.Append("CodeID=");
            builder.Append(model.CodeID + ",");
            builder.Append("AddUser="******"'" + model.AddUser + "',");
            builder.Append("AddTime=");
            builder.Append("'" + model.AddTime + "',");
            builder.Append("Remark=");
            builder.Append("'" + model.Remark + "'");
            builder.Append(" where ");
            builder.Append("InfoID=");
            builder.Append("'" + model.InfoID + "'");
            return(publicDbOpClass.ExecSqlString(builder.ToString()));
        }
Example #2
0
        public bool Add(PrjStageInfoModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("insert into OPM_Prj_StageInfo(InfoID, PrjStageID,InfoCode,InfoName,InfoContent,FlowState,IsValid,IsFile,FileType,AddUser,AddTime,PrjID,Remark)");
            builder.Append(" values(");
            builder.Append("'" + model.InfoID + "',");
            builder.Append("'" + model.PrjStageID + "',");
            builder.Append("'" + model.InfoCode + "',");
            builder.Append("'" + model.InfoName + "',");
            builder.Append("'" + model.InfoContent + "',");
            builder.Append(model.FlowState + ",");
            builder.Append("'" + model.IsValid + "',");
            builder.Append("'" + model.IsFile + "',");
            builder.Append(model.FileType + ",");
            builder.Append("'" + model.AddUser + "',");
            builder.Append("'" + model.AddTime + "',");
            builder.Append("'" + model.PrjID + "',");
            builder.Append("'" + model.Remark + "'");
            builder.Append(")");
            return(publicDbOpClass.NonQuerySqlString(builder.ToString()));
        }