コード例 #1
0
        public int UpdateFires(FireModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("Update OPM_Business_Data SET");
            builder.Append(" Prjid=");
            builder.Append("'" + model.PrjId + "',");
            builder.Append(" codeID=");
            builder.Append(model.CodeId + ",");
            builder.Append(" BCode=");
            builder.Append("'" + model.BCode + "',");
            builder.Append(" BName=");
            builder.Append("'" + model.BName + "',");
            builder.Append(" DutyUser="******"'" + model.DutyUser + "',");
            builder.Append(" Cause=");
            builder.Append("'" + model.Cause + "',");
            builder.Append("FlowState=");
            builder.Append("'" + model.Flowstate + "',");
            builder.Append("IsValid=");
            builder.Append("'" + model.Isvalid + "',");
            builder.Append("AddUser="******"'" + model.Adduser + "',");
            builder.Append("AddTime=");
            builder.Append("'" + model.Addtime + "',");
            builder.Append("Remark=");
            builder.Append("'" + model.Remark + "',");
            builder.Append("I_xh=");
            builder.Append(model.I_xh + " ");
            builder.Append(" where ");
            builder.Append("UId=");
            builder.Append("'" + model.UId + "'");
            return(publicDbOpClass.ExecSqlString(builder.ToString()));
        }
コード例 #2
0
        public bool AddFires(FireModel model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("insert into OPM_Business_Data(UID, BType,PrjID,codeID");
            builder.Append(",BCode,BName,DutyUser,Cause,AddUser,AddTime,Remark,i_xh,IsValid,FlowState)");
            builder.Append(" values(");
            builder.Append("'" + model.UId + "',");
            builder.Append("'" + model.BType + "',");
            builder.Append("'" + model.PrjId + "',");
            builder.Append("'" + model.CodeId + "',");
            builder.Append("'" + model.BCode + "',");
            builder.Append("'" + model.BName + "',");
            builder.Append("'" + model.DutyUser + "',");
            builder.Append("'" + model.Cause + "',");
            builder.Append("'" + model.Adduser + "',");
            builder.Append("'" + model.Addtime + "',");
            builder.Append("'" + model.Remark + "',");
            builder.Append(model.I_xh + ",");
            builder.Append("'" + model.Isvalid + "',");
            builder.Append(model.Flowstate + " ");
            builder.Append(")");
            return(publicDbOpClass.NonQuerySqlString(builder.ToString()));
        }