Beispiel #1
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Mdy(PEST_REPORT_DIEPINESURVEY_Model m)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("UPDATE PEST_REPORT_DIEPINESURVEY");
            sb.AppendFormat(" SET ");
            sb.AppendFormat("BYORGNO='{0}'", ClsSql.EncodeSql(m.BYORGNO));
            sb.AppendFormat(",FINDER='{0}'", ClsSql.EncodeSql(m.FINDER));
            sb.AppendFormat(",FINDDATE='{0}'", ClsSql.EncodeSql(m.FINDDATE));
            sb.AppendFormat(",LINKTELL='{0}'", ClsSql.EncodeSql(m.LINKTELL));
            sb.AppendFormat(",DIEPINECOUNT={0}", ClsSql.saveNullField(m.DIEPINECOUNT));
            sb.AppendFormat(",REPORTDATE='{0}'", ClsSql.EncodeSql(m.REPORTDATE));
            sb.AppendFormat(",SAMPLINGCOUNT='{0}'", ClsSql.EncodeSql(m.SAMPLINGCOUNT));
            sb.AppendFormat(",AUTHENTICATERESULT={0}", ClsSql.saveNullField(m.AUTHENTICATERESULT));
            sb.AppendFormat(" WHERE PEST_REPORT_DIEPINESURVEYID= '{0}'", ClsSql.EncodeSql(m.PEST_REPORT_DIEPINESURVEYID));
            bool bln = DataBaseClass.ExeSql(sb.ToString());

            if (bln == true)
            {
                return(new Message(true, "修改成功!", m.returnUrl));
            }
            else
            {
                return(new Message(false, "修改失败,请检查各输入框是否正确!", m.returnUrl));
            }
        }
Beispiel #2
0
        /// <summary>
        /// 获取数据列表
        /// </summary>
        /// <param name="sw"></param>
        /// <returns></returns>
        public static DataTable getDT(FIRELOST_LOSTTYPE_FARMPASTUREPRODUCT_SW sw)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat(" FROM  FIRELOST_LOSTTYPE_FARMPASTUREPRODUCT WHERE  1=1");
            if (string.IsNullOrEmpty(sw.FIRELOST_LOSTTYPE_FARMPASTUREPRODUCTID) == false)
            {
                sb.AppendFormat(" AND FIRELOST_LOSTTYPE_FARMPASTUREPRODUCTID = '{0}'", ClsSql.EncodeSql(sw.FIRELOST_LOSTTYPE_FARMPASTUREPRODUCTID));
            }
            if (string.IsNullOrEmpty(sw.FIRELOST_FIREINFOID) == false)
            {
                sb.AppendFormat(" AND FIRELOST_FIREINFOID = '{0}'", ClsSql.EncodeSql(sw.FIRELOST_FIREINFOID));
            }
            if (string.IsNullOrEmpty(sw.FARMPASTUREPRODUCNAME) == false)
            {
                sb.AppendFormat(" AND FARMPASTUREPRODUCNAME like '%{0}%'", ClsSql.EncodeSql(sw.FARMPASTUREPRODUCNAME));
            }
            if (string.IsNullOrEmpty(sw.FARMPASTUREPRODUCCODE) == false)
            {
                sb.AppendFormat(" AND FARMPASTUREPRODUCCODE = '{0}'", ClsSql.EncodeSql(sw.FARMPASTUREPRODUCCODE));
            }
            string sql = "SELECT FIRELOST_LOSTTYPE_FARMPASTUREPRODUCTID, FIRELOST_FIREINFOID, FARMPASTUREPRODUCNAME, FARMPASTUREPRODUCCODE, LOSEMONEYCOUNT, LOSECOUNT, BASEPRICE, MARK "
                         + sb.ToString() + " ORDER BY FIRELOST_LOSTTYPE_FARMPASTUREPRODUCTID ";
            DataSet ds = DataBaseClass.FullDataSet(sql);

            return(ds.Tables[0]);
        }
Beispiel #3
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Save(WILD_ANIMALPROP_Model m)
        {
            StringBuilder sb = new StringBuilder();

            if (isExists(new WILD_ANIMALPROP_SW {
                BIOLOGICALTYPECODE = m.BIOLOGICALTYPECODE
            }))
            {
                sb.AppendFormat("Update WILD_ANIMALPROP Set ");
                sb.AppendFormat(" PROTECTIONLEVELCODE='{0}'", ClsSql.EncodeSql(m.PROTECTIONLEVELCODE));
                sb.AppendFormat(",LIVINGSTATUSCODE='{0}'", ClsSql.EncodeSql(m.LIVINGSTATUSCODE));
                sb.AppendFormat(" WHERE BIOLOGICALTYPECODE= '{0}'", ClsSql.EncodeSql(m.BIOLOGICALTYPECODE));
            }
            else
            {
                sb.AppendFormat("Insert Into WILD_ANIMALPROP(BIOLOGICALTYPECODE, PROTECTIONLEVELCODE, LIVINGSTATUSCODE)");
                sb.AppendFormat(" Values(");
                sb.AppendFormat(" '{0}'", ClsSql.EncodeSql(m.BIOLOGICALTYPECODE));
                sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.PROTECTIONLEVELCODE));
                sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.LIVINGSTATUSCODE));
                sb.AppendFormat(")");
            }
            bool bln = DataBaseClass.ExeSql(sb.ToString());

            if (bln == true)
            {
                return(new Message(true, "保存成功!", ""));
            }
            else
            {
                return(new Message(false, "保存失败!", ""));
            }
        }
Beispiel #4
0
        /// <summary>
        /// 添加返回当前记录的id
        /// </summary>
        /// <param name="o"></param>
        /// <returns></returns>
        public static Message Add(OD_ODTYPE_Model o)
        {//增加判断该值班日期是否已存在
            StringBuilder sbExits = new StringBuilder();

            sbExits.AppendFormat("select ONDUTYID,ONDUTYDATE from OD_DATE where OD_TYPEID in(select OD_TYPEID from OD_TYPE where byorgno='{0}')", SystemCls.getCurUserOrgNo());
            sbExits.AppendFormat("and( ONDUTYDATE>='{0}' and ONDUTYDATE<='{1}')", o.OD_DATEBEGIN, o.OD_DATEEND);

            if (DataBaseClass.JudgeRecordExists(sbExits.ToString()) == true)
            {
                return(new Message(false, "新建失败,在该值班日期范围内已存在历史值班日期!", ""));
            }
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("insert into OD_TYPE(OD_TYPENAME,OD_DATEBEGIN,OD_DATEEND,BYORGNO) output inserted.OD_TYPEID values(");
            sb.AppendFormat("'{0}',", ClsSql.EncodeSql(o.OD_TYPENAME));
            sb.AppendFormat("'{0}',", ClsSql.EncodeSql(o.OD_DATEBEGIN));
            sb.AppendFormat("'{0}',", ClsSql.EncodeSql(o.OD_DATEEND));
            sb.AppendFormat("'{0}')", ClsSql.EncodeSql(SystemCls.getCurUserOrgNo()));
            try
            {
                string strid = DataBaseClass.ReturnSqlField(sb.ToString());
                return(new Message(true, "新建成功", strid));
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #5
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Mdy(T_SYSSEC_IPSUSER_Model m)
        {
            //判断用户序号是否存在于系统扩展表中
            if (T_SYSSEC_USER.isExists(new T_SYSSEC_IPSUSER_SW {
                USERID = m.USERID
            }) == false)
            {
                return(new Message(false, "修改失败,系统用户不存在!", ""));
            }
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("update T_SYSSEC_IPSUSER");
            sb.AppendFormat(" set ");
            sb.AppendFormat(" SEX='{0}'", ClsSql.EncodeSql(m.SEX));
            sb.AppendFormat(",PHONE='{0}'", ClsSql.EncodeSql(m.PHONE));
            sb.AppendFormat(",USERJOB='{0}'", ClsSql.EncodeSql(m.USERJOB));
            sb.AppendFormat(" where USERID= '{0}'", ClsSql.EncodeSql(m.USERID));
            bool bln = DataBaseClass.ExeSql(sb.ToString());

            if (bln == true)
            {
                return(new Message(true, "修改成功!", ""));
            }
            else
            {
                return(new Message(false, "修改失败,请检查各输入框是否正确!", ""));
            }
        }
Beispiel #6
0
        /// <summary>
        ///  获取数据
        /// </summary>
        /// <param name="sw"></param>
        /// <returns></returns>
        public static DataTable getDT(PEST_PESTINFOFILE_SW sw)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat(" FROM PEST_PESTINFOFILE  WHERE 1=1");

            #region 查询条件
            //生物物种编码
            if (string.IsNullOrEmpty(sw.BIOLOGICALTYPECODE) == false)
            {
                sb.AppendFormat(" AND BIOLOGICALTYPECODE = '{0}'", ClsSql.EncodeSql(sw.BIOLOGICALTYPECODE));
            }
            //附近名称
            if (string.IsNullOrEmpty(sw.PESTFILETITLE) == false)
            {
                sb.AppendFormat(" AND PESTFILETITLE = '{0}'", ClsSql.EncodeSql(sw.PESTFILETITLE));
            }
            //附件类别
            if (string.IsNullOrEmpty(sw.PESTFILETYPE) == false)
            {
                sb.AppendFormat(" AND PESTFILETYPE = '{0}'", ClsSql.EncodeSql(sw.PESTFILETYPE));
            }
            #endregion

            string  sql = "SELECT  PESTFILEID, BIOLOGICALTYPECODE, PESTFILETITLE, PESTFILETYPE, PESTFILENAME, UPLOADTIME, UID " + sb.ToString() + " ORDER BY UPLOADTIME ";
            DataSet ds  = DataBaseClass.FullDataSet(sql);
            return(ds.Tables[0]);
        }
Beispiel #7
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Mdy(DC_UTILITY_MONITORINGSTATION_Model m)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("UPDATE DC_UTILITY_MONITORINGSTATION");
            sb.AppendFormat(" set ");
            sb.AppendFormat("NUMBER={0}", ClsSql.saveNullField(m.NUMBER));
            sb.AppendFormat(",NAME={0}", ClsSql.saveNullField(m.NAME));
            sb.AppendFormat(",ADDRESS={0}", ClsSql.saveNullField(m.ADDRESS));
            sb.AppendFormat(",MODEL={0}", ClsSql.saveNullField(m.MODEL));
            sb.AppendFormat(",BYORGNO={0}", ClsSql.saveNullField(m.BYORGNO));
            sb.AppendFormat(",TRANSFERMODETYPE={0}", ClsSql.saveNullField(m.TRANSFERMODETYPE));
            sb.AppendFormat(",MONICONTENT={0}", ClsSql.saveNullField(m.MONICONTENT));
            sb.AppendFormat(",BUILDDATE={0}", ClsSql.saveNullField(m.BUILDDATE));
            sb.AppendFormat(",USESTATE={0}", ClsSql.saveNullField(m.USESTATE));
            sb.AppendFormat(",MANAGERSTATE={0}", ClsSql.saveNullField(m.MANAGERSTATE));
            sb.AppendFormat(",MARK={0}", ClsSql.saveNullField(m.MARK));
            sb.AppendFormat(",JD={0}", ClsSql.saveNullField(m.JD));
            sb.AppendFormat(",WD={0}", ClsSql.saveNullField(m.WD));
            sb.AppendFormat(",WORTH={0}", ClsSql.saveNullField(m.WORTH));
            sb.AppendFormat(",BUILDDATEBEGIN={0}", ClsSql.saveNullField(m.BUILDDATEBEGIN));
            sb.AppendFormat(",BUILDDATEEND={0}", ClsSql.saveNullField(m.BUILDDATEEND));
            sb.AppendFormat(" where DC_UTILITY_MONITORINGSTATION_ID= '{0}'", ClsSql.EncodeSql(m.DC_UTILITY_MONITORINGSTATION_ID));
            bool bln = DataBaseClass.ExeSql(sb.ToString());

            if (bln == true)
            {
                return(new Message(true, "修改成功!", m.DC_UTILITY_MONITORINGSTATION_ID));
            }
            else
            {
                return(new Message(false, "修改失败,请检查各输入框是否正确!", ""));
            }
        }
Beispiel #8
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message MdyTP(DC_PHOTO_Model m)
        {
            StringBuilder sb = new StringBuilder();

            //HID, HNAME, SN, PHONE, SEX, BIRTH, ONSTATE, BYORGNO
            sb.AppendFormat("UPDATE DC_PHOTO");
            sb.AppendFormat(" set ");
            //sb.AppendFormat("PHOTO_ID={0}", ClsSql.saveNullField(m.PHOTO_ID));
            sb.AppendFormat("PHOTOTITLE={0}", ClsSql.saveNullField(m.PHOTOTITLE));
            //sb.AppendFormat(",PHOTOFILENAME={0}", ClsSql.saveNullField(m.PHOTOFILENAME));
            sb.AppendFormat(",PHOTOEXPLAIN={0}", ClsSql.saveNullField(m.PHOTOEXPLAIN));
            sb.AppendFormat(",PHOTOTIME={0}", ClsSql.saveNullField(m.PHOTOTIME));
            sb.AppendFormat(",PHOTOTYPE={0}", ClsSql.saveNullField(m.PHOTOTYPE));
            sb.AppendFormat(",PRID={0}", ClsSql.saveNullField(m.PRID));
            sb.AppendFormat(" where PHOTO_ID= '{0}'", ClsSql.EncodeSql(m.PHOTO_ID));
            bool bln = DataBaseClass.ExeSql(sb.ToString());

            if (bln == true)
            {
                return(new Message(true, "修改成功!", ""));
            }
            else
            {
                return(new Message(false, "修改失败,请检查各输入框是否正确!", ""));
            }
        }
Beispiel #9
0
        /// <summary>
        /// 获取记录
        /// </summary>
        /// <param name="sw"></param>
        /// <returns></returns>
        public static DataTable getDT(DC_ARMY_MEMBER_SW sw)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat(" FROM      DC_ARMY_MEMBER");
            sb.AppendFormat(" WHERE   1=1");
            if (string.IsNullOrEmpty(sw.DC_ARMY_MEMBER_ID) == false)
            {
                sb.AppendFormat(" AND DC_ARMY_MEMBER_ID = '{0}'", ClsSql.EncodeSql(sw.DC_ARMY_MEMBER_ID));
            }
            if (string.IsNullOrEmpty(sw.DC_ARMY_ID) == false)
            {
                sb.AppendFormat(" AND DC_ARMY_ID = '{0}'", ClsSql.EncodeSql(sw.DC_ARMY_ID));
            }
            if (string.IsNullOrEmpty(sw.MEMBERNAME) == false)
            {
                sb.AppendFormat(" AND MEMBERNAME like '%{0}%'", ClsSql.EncodeSql(sw.MEMBERNAME));
            }
            if (string.IsNullOrEmpty(sw.SEX) == false)
            {
                sb.AppendFormat(" AND SEX = '{0}'", ClsSql.EncodeSql(sw.SEX));
            }
            string sql = "";

            sql = "SELECT DC_ARMY_MEMBER_ID, DC_ARMY_ID, MEMBERNAME, SEX, CONTACTS, BIRTH"
                  + sb.ToString()
                  + " order by MEMBERNAME";

            DataSet ds = DataBaseClass.FullDataSet(sql);

            return(ds.Tables[0]);
        }
Beispiel #10
0
        /// <summary>
        /// 获取记录
        /// </summary>
        /// <param name="sw"></param>
        /// <returns></returns>
        public static DataTable getDT(DC_PHOTO_SW sw)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat(" FROM      DC_PHOTO");
            sb.AppendFormat(" WHERE   1=1");
            if (string.IsNullOrEmpty(sw.PHOTO_ID) == false)
            {
                sb.AppendFormat(" AND PHOTO_ID = '{0}'", ClsSql.EncodeSql(sw.PHOTO_ID));
            }
            if (string.IsNullOrEmpty(sw.PHOTOTYPE) == false)
            {
                sb.AppendFormat(" AND PHOTOTYPE = '{0}'", ClsSql.EncodeSql(sw.PHOTOTYPE));
            }
            if (string.IsNullOrEmpty(sw.PRID) == false)
            {
                sb.AppendFormat(" AND PRID = '{0}'", ClsSql.EncodeSql(sw.PRID));
            }
            string sql = "";

            sql = "SELECT PHOTO_ID, PHOTOTITLE, PHOTOFILENAME, PHOTOEXPLAIN, PHOTOTIME, PHOTOTYPE, PRID"
                  + sb.ToString()
                  + " order by PHOTO_ID desc";
            DataSet ds = DataBaseClass.FullDataSet(sql);

            return(ds.Tables[0]);
        }
Beispiel #11
0
        /// <summary>
        /// 获取分页列表
        /// </summary>
        /// <param name="sw"></param>
        /// <param name="total"></param>
        /// <returns></returns>
        public static DataTable getDT(DC_PHOTO_SW sw, out int total)
        {
            StringBuilder sb = new StringBuilder();


            sb.AppendFormat(" FROM      DC_PHOTO");
            sb.AppendFormat(" WHERE   1=1");
            if (string.IsNullOrEmpty(sw.PHOTO_ID) == false)
            {
                sb.AppendFormat(" AND PHOTO_ID = '{0}'", ClsSql.EncodeSql(sw.PHOTO_ID));
            }
            if (string.IsNullOrEmpty(sw.PHOTOTYPE) == false)
            {
                sb.AppendFormat(" AND PHOTOTYPE = '{0}'", ClsSql.EncodeSql(sw.PHOTOTYPE));
            }
            if (string.IsNullOrEmpty(sw.PRID) == false)
            {
                sb.AppendFormat(" AND PRID = '{0}'", ClsSql.EncodeSql(sw.PRID));
            }
            string sql = "SELECT PHOTO_ID, PHOTOTITLE, PHOTOFILENAME, PHOTOEXPLAIN, PHOTOTIME, PHOTOTYPE, PRID"
                         + sb.ToString()
                         + " order by PHOTO_ID desc";
            string sqlC = "select count(1) " + sb.ToString();

            total      = int.Parse(DataBaseClass.ReturnSqlField(sqlC));
            sw.curPage = PagerCls.getCurPage(new PagerSW {
                curPage = sw.curPage, pageSize = sw.pageSize, rowCount = total
            });
            DataSet ds = DataBaseClass.FullDataSet(sql, (sw.curPage - 1) * sw.pageSize, sw.pageSize, "a");

            return(ds.Tables[0]);
        }
Beispiel #12
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Mdy(T_SYS_DICTModel m)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("UPDATE T_SYS_DICT ");
            sb.AppendFormat(" SET ");
            //sb.AppendFormat("DICTID={0}", ClsSql.EncodeSql(m.DICTID));
            //sb.AppendFormat("DICTFLAG='{0}'",ClsSql.EncodeSql(m.DICTFLAG));
            sb.AppendFormat(" DICTNAME='{0}'", ClsSql.EncodeSql(m.DICTNAME));
            sb.AppendFormat(",DICTVALUE='{0}'", ClsSql.EncodeSql(m.DICTVALUE));
            sb.AppendFormat(",STANDBY1='{0}'", ClsSql.EncodeSql(m.STANDBY1));
            sb.AppendFormat(",STANDBY2='{0}'", ClsSql.EncodeSql(m.STANDBY2));
            sb.AppendFormat(",STANDBY3='{0}'", ClsSql.EncodeSql(m.STANDBY3));
            sb.AppendFormat(",STANDBY4='{0}'", ClsSql.EncodeSql(m.STANDBY4));
            sb.AppendFormat(",ORDERBY='{0}'", ClsSql.EncodeSql(m.ORDERBY));
            //sb.AppendFormat("ISMAN={0}", ClsSql.EncodeSql(m.ISMAN));
            sb.AppendFormat(" where DICTID='{0}'", ClsSql.EncodeSql(m.DICTID));
            bool bln = DataBaseClass.ExeSql(sb.ToString());

            if (bln == true)
            {
                return(new Message(true, "修改成功!", ""));
            }
            else
            {
                return(new Message(false, "修改失败,请检查各输入框是否正确!", ""));
            }
        }
Beispiel #13
0
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Add(T_SYS_DICTModel m)
        {
            if (isExists(new T_SYS_DICTSW {
                DICTTYPEID = m.DICTTYPEID, DICTVALUE = m.DICTVALUE
            }))
            {
                return(new Message(false, "添加失败,该值已存在!", ""));
            }
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("INSERT INTO T_SYS_DICT(DICTTYPEID,DICTNAME, DICTVALUE, ORDERBY,STANDBY1,STANDBY2,STANDBY3,STANDBY4)");
            sb.AppendFormat("VALUES(");
            sb.AppendFormat("'{0}'", ClsSql.EncodeSql(m.DICTTYPEID));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.DICTNAME));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.DICTVALUE));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.ORDERBY));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.STANDBY1));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.STANDBY2));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.STANDBY3));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.STANDBY4));
            sb.AppendFormat(")");
            bool bln = DataBaseClass.ExeSql(sb.ToString());

            if (bln == true)
            {
                return(new Message(true, "添加成功!", ""));
            }
            else
            {
                return(new Message(false, "添加失败,请检查输入框是否正确!", ""));
            }
        }
Beispiel #14
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Del(PEST_REPORT_DIEPINESURVEY_Model m)
        {
            string[]      arrDIEPINESURVEYID = m.PEST_REPORT_DIEPINESURVEYID.Split(',');
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("DELETE FROM PEST_REPORT_DIEPINESURVEY WHERE PEST_REPORT_DIEPINESURVEYID in (");
            for (int i = 0; i < arrDIEPINESURVEYID.Length; i++)
            {
                if (i != arrDIEPINESURVEYID.Length - 1)
                {
                    sb.AppendFormat("'{0}',", ClsSql.EncodeSql(arrDIEPINESURVEYID[i]));
                }
                else
                {
                    sb.AppendFormat("'{0}'", ClsSql.EncodeSql(arrDIEPINESURVEYID[i]));
                }
            }
            sb.AppendFormat(")");
            bool bln = DataBaseClass.ExeSql(sb.ToString());

            if (bln == true)
            {
                return(new Message(true, "删除成功!", m.returnUrl));
            }
            else
            {
                return(new Message(false, "删除失败!", m.returnUrl));
            }
        }
Beispiel #15
0
        /// <summary>
        /// 判断记录是否存在
        /// </summary>
        /// <param name="sw">参见模型</param>
        /// <returns>true存在 false不存在 </returns>
        public static bool isExists(FIRERECORD_REPORT9_SW sw)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("select 1 from FIRERECORD_REPORT9 where 1=1");
            if (string.IsNullOrEmpty(sw.FIRERECORD_REPORT9ID) == false)
            {
                sb.AppendFormat(" and FIRERECORD_REPORT9ID='{0}'", ClsSql.EncodeSql(sw.FIRERECORD_REPORT9ID));
            }
            if (string.IsNullOrEmpty(sw.BYORGNO) == false)
            {
                sb.AppendFormat(" and BYORGNO='{0}'", ClsSql.EncodeSql(sw.BYORGNO));
            }
            if (string.IsNullOrEmpty(sw.REPORTYEAR) == false)
            {
                sb.AppendFormat(" and REPORTYEAR='{0}'", ClsSql.EncodeSql(sw.REPORTYEAR));
            }
            if (string.IsNullOrEmpty(sw.REPORTCODE) == false)
            {
                sb.AppendFormat(" and REPORTCODE='{0}'", ClsSql.EncodeSql(sw.REPORTCODE));
            }
            if (string.IsNullOrEmpty(sw.SSXTYPELEVELCODE) == false)
            {
                sb.AppendFormat(" and SSXTYPELEVELCODE='{0}'", ClsSql.EncodeSql(sw.SSXTYPELEVELCODE));
            }
            return(DataBaseClass.JudgeRecordExists(sb.ToString()));
        }
Beispiel #16
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Mdy(DC_EQUIP_NEW_Model m)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("UPDATE DC_EQUIP_NEW");
            sb.AppendFormat(" set ");
            sb.AppendFormat("EQUIPTYPE={0}", ClsSql.saveNullField(m.EQUIPTYPE));
            sb.AppendFormat(",NUMBER={0}", ClsSql.saveNullField(m.NUMBER));
            sb.AppendFormat(",NAME={0}", ClsSql.saveNullField(m.NAME));
            sb.AppendFormat(",BYORGNO={0}", ClsSql.saveNullField(m.BYORGNO));
            sb.AppendFormat(",MODEL={0}", ClsSql.saveNullField(m.MODEL));
            sb.AppendFormat(",BUYYEAR={0}", ClsSql.saveNullField(m.BUYYEAR));
            sb.AppendFormat(",USESTATE={0}", ClsSql.saveNullField(m.USESTATE));
            sb.AppendFormat(",STOREADDR={0}", ClsSql.saveNullField(m.STOREADDR));
            sb.AppendFormat(",MARK={0}", ClsSql.saveNullField(m.MARK));
            sb.AppendFormat(",JD={0}", ClsSql.saveNullField(m.JD));
            sb.AppendFormat(",WD={0}", ClsSql.saveNullField(m.WD));
            sb.AppendFormat(",WORTH={0}", ClsSql.saveNullField(m.WORTH));
            sb.AppendFormat(",EQUIPAMOUNT={0}", ClsSql.saveNullField(m.EQUIPAMOUNT));
            sb.AppendFormat(",REPID={0}", ClsSql.saveNullField(m.REPID));
            sb.AppendFormat(",DCSUPPROPUNIT={0}", ClsSql.saveNullField(m.DCSUPPROPUNIT));
            sb.AppendFormat(",PRICE={0}", ClsSql.saveNullField(m.PRICE));
            sb.AppendFormat(" where DC_EQUIP_NEW_ID= '{0}'", ClsSql.EncodeSql(m.DC_EQUIP_NEW_ID));
            bool bln = DataBaseClass.ExeSql(sb.ToString());

            if (bln == true)
            {
                return(new Message(true, "修改成功!", m.DC_EQUIP_NEW_ID));
            }
            else
            {
                return(new Message(false, "修改失败,请检查各输入框是否正确!", ""));
            }
        }
Beispiel #17
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Mdy(T_SYS_ORG_CWH_Model m)
        {
            if (string.IsNullOrEmpty(m.ORDERBY))//如果排序号为空,则取最大+1
            {
                m.ORDERBY = DataBaseClass.ReturnSqlField("select max(ORDERBY)+1 from T_SYS_ORG_CWH where BYORGNO='" + ClsSql.EncodeSql(m.BYORGNO) + "'");
            }
            if (string.IsNullOrEmpty(m.ORDERBY))
            {
                m.ORDERBY = "1";
            }
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("UPDATE T_SYS_ORG_CWH");
            sb.AppendFormat(" set ");
            sb.AppendFormat("BYORGNO='{0}'", ClsSql.EncodeSql(m.BYORGNO));
            sb.AppendFormat(",CWHNAME='{0}'", ClsSql.EncodeSql(m.CWHNAME));
            sb.AppendFormat(",ORDERBY='{0}'", ClsSql.EncodeSql(m.ORDERBY));
            sb.AppendFormat(" where CWHID= '{0}'", ClsSql.EncodeSql(m.CWHID));
            bool bln = DataBaseClass.ExeSql(sb.ToString());

            if (bln == true)
            {
                return(new Message(true, "修改成功!", ""));
            }
            else
            {
                return(new Message(false, "修改失败,请检查各输入框是否正确!", ""));
            }
        }
Beispiel #18
0
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <returns>参见模型</returns>
        public static DataTable getDT(JC_MONITOR_SW sw)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat(" SELECT   IMBID, TTBH, IMBTIME, JD, WD, SPJ, FYJ, IMBIMGURL, MANSTATE, MANRESULT, MANTIME,MANUSERID");
            sb.AppendFormat(" from JC_MONITOR");
            sb.AppendFormat(" WHERE   1 = 1");

            if (string.IsNullOrEmpty(sw.IMBID) == false)
            {
                sb.AppendFormat(" AND IMBID = '{0}'", ClsSql.EncodeSql(sw.IMBID));
            }
            if (string.IsNullOrEmpty(sw.TTBH) == false)
            {
                sb.AppendFormat(" AND TTBH = '{0}'", ClsSql.EncodeSql(sw.TTBH));
            }

            if (!string.IsNullOrEmpty(sw.DateBegin))
            {
                sb.AppendFormat(" AND IMBTIME>='{0} 00:00:00'", sw.DateBegin);
            }
            if (!string.IsNullOrEmpty(sw.DateEnd))
            {
                sb.AppendFormat(" AND IMBTIME<='{0} 23:59:59'", sw.DateEnd);
            }
            if (string.IsNullOrEmpty(sw.MANSTATE) == false)
            {
                sb.AppendFormat(" AND MANSTATE = '{0}'", ClsSql.EncodeSql(sw.MANSTATE));
            }
            string sql = sb.ToString()
                         + " order by IMBTIME DESC";
            DataSet ds = DataBaseClass.FullDataSet(sql);

            return(ds.Tables[0]);
        }
Beispiel #19
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Mdy(JC_FIRE_PLAN_Model m)
        {
            StringBuilder sb = new StringBuilder();

            //HID, HNAME, SN, PHONE, SEX, BIRTH, ONSTATE, BYORGNO
            sb.AppendFormat("UPDATE JC_FIRE_PLAN");
            sb.AppendFormat(" set ");
            sb.AppendFormat("BYORGNO='{0}'", ClsSql.EncodeSql(m.BYORGNO));
            sb.AppendFormat(",FIRELEVEL='{0}'", ClsSql.EncodeSql(m.FIRELEVEL));
            sb.AppendFormat(",PLANTITLE='{0}'", ClsSql.EncodeSql(m.PLANTITLE));
            sb.AppendFormat(",PLANCONTENT='{0}'", ClsSql.EncodeSql(m.PLANCONTENT));
            sb.AppendFormat(",PLANFILENAME='{0}'", ClsSql.EncodeSql(m.PLANFILENAME));
            sb.AppendFormat(" where JC_FIRE_PLANID= '{0}'", ClsSql.EncodeSql(m.JC_FIRE_PLANID));

            bool bln = DataBaseClass.ExeSql(sb.ToString());

            if (bln == true)
            {
                return(new Message(true, "修改成功!", ""));
            }
            else
            {
                return(new Message(false, "修改失败,请检查各输入框是否正确!", ""));
            }
        }
Beispiel #20
0
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Add(JC_MONITOR_Model m)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("INSERT INTO  JC_MONITOR(TTBH, IMBTIME, JD, WD, SPJ, FYJ, IMBIMGURL)");
            sb.AppendFormat("VALUES(");
            sb.AppendFormat("'{0}'", ClsSql.EncodeSql(m.TTBH));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.IMBTIME));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.JD));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.WD));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.SPJ));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.FYJ));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.IMBIMGURL));
            sb.AppendFormat(")");
            bool bln = DataBaseClass.ExeSql(sb.ToString());

            if (bln == true)
            {
                return(new Message(true, "添加成功!", ""));
            }
            else
            {
                return(new Message(false, "添加失败,请检查各输入框是否正确!", ""));
            }
        }
Beispiel #21
0
        /// <summary>
        /// 判断记录是否存在
        /// </summary>
        /// <param name="sw">参见模型</param>
        /// <returns>true存在 false不存在</returns>
        public static bool isExists(OD_HANDOVER_SW sw)
        {
            //ONDUTYDATE, BYORGNO, ONDUTYUSERTYPE, ONDUTYTYPE, ONDUTYUSERID, OPTIME, OPCONTENT
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("select 1 from OD_HANDOVER where 1=1");
            if (string.IsNullOrEmpty(sw.BYORGNO) == false)
            {
                sb.AppendFormat(" and BYORGNO='{0}'", ClsSql.EncodeSql(sw.BYORGNO));
            }
            if (string.IsNullOrEmpty(sw.ODHID) == false)
            {
                sb.AppendFormat(" and ODHID='{0}'", ClsSql.EncodeSql(sw.ODHID));
            }
            if (string.IsNullOrEmpty(sw.ONDUTYUSERTYPE) == false)
            {
                sb.AppendFormat(" and ONDUTYUSERTYPE='{0}'", ClsSql.EncodeSql(sw.ONDUTYUSERTYPE));
            }
            if (string.IsNullOrEmpty(sw.ONDUTYTYPE) == false)
            {
                sb.AppendFormat(" and ONDUTYTYPE='{0}'", ClsSql.EncodeSql(sw.ONDUTYTYPE));
            }
            if (string.IsNullOrEmpty(sw.ONDUTYUSERID) == false)
            {
                sb.AppendFormat(" and ONDUTYUSERID='{0}'", ClsSql.EncodeSql(sw.ONDUTYUSERID));
            }
            if (string.IsNullOrEmpty(sw.ONDUTYDATE) == false)
            {
                sb.AppendFormat(" and ONDUTYDATE='{0}'", ClsSql.EncodeSql(sw.ONDUTYDATE));
            }
            return(DataBaseClass.JudgeRecordExists(sb.ToString()));
        }
Beispiel #22
0
        /// <summary>
        /// 获取数据列表
        /// </summary>
        /// <param name="sw"></param>
        /// <returns></returns>
        public static DataTable getDT(FIRELOST_LOSTTYPE_ATTACK_P3_SW sw)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat(" FROM  FIRELOST_LOSTTYPE_ATTACK_P3 WHERE  1=1");
            if (string.IsNullOrEmpty(sw.P3ID) == false)
            {
                sb.AppendFormat(" AND P3ID = '{0}'", ClsSql.EncodeSql(sw.P3ID));
            }
            if (string.IsNullOrEmpty(sw.FIRELOST_FIREINFOID) == false)
            {
                sb.AppendFormat(" AND FIRELOST_FIREINFOID = '{0}'", ClsSql.EncodeSql(sw.FIRELOST_FIREINFOID));
            }
            if (string.IsNullOrEmpty(sw.P3NAME) == false)
            {
                sb.AppendFormat(" AND P3NAME like '%{0}%'", ClsSql.EncodeSql(sw.P3NAME));
            }
            if (string.IsNullOrEmpty(sw.P3CODE) == false)
            {
                sb.AppendFormat(" AND P3CODE  = '{0}'", ClsSql.EncodeSql(sw.P3CODE));
            }
            string sql = "SELECT P3ID, FIRELOST_FIREINFOID, P3NAME, P3CODE, LOSEMONEYCOUNT, P3MONEY, ATTACKNUMBERS, ATTACKDAYS, MARK "
                         + sb.ToString() + " ORDER BY P3ID ";
            DataSet ds = DataBaseClass.FullDataSet(sql);

            return(ds.Tables[0]);
        }
Beispiel #23
0
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Add(T_SYSSEC_IPSUSER_Model m)
        {
            //判断用户序号是否存在于系统扩展表中
            if (T_SYSSEC_USER.isExists(new T_SYSSEC_IPSUSER_SW {
                USERID = m.USERID
            }) == false)
            {
                return(new Message(false, "添加失败,系统用户不存在!", ""));
            }
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("INSERT INTO T_SYSSEC_IPSUSER(USERID,SEX,PHONE,USERJOB)");
            sb.AppendFormat("VALUES(");
            sb.AppendFormat("'{0}'", ClsSql.EncodeSql(m.USERID));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.SEX));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.PHONE));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.USERJOB));
            sb.AppendFormat(")");
            bool bln = DataBaseClass.ExeSql(sb.ToString());

            if (bln == true)
            {
                return(new Message(true, "添加成功!", ""));
            }
            else
            {
                return(new Message(false, "添加失败,请检查各输入框是否正确!", ""));
            }
        }
Beispiel #24
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Mdy(ART_DOCUMENT_Model m)
        {
            StringBuilder sb = new StringBuilder();

            //HID, HNAME, SN, PHONE, SEX, BIRTH, ONSTATE, BYORGNO
            sb.AppendFormat("UPDATE ART_DOCUMENT");
            sb.AppendFormat(" set ");
            sb.AppendFormat(" ARTTYPEID='{0}'", ClsSql.EncodeSql(m.ARTTYPEID));
            sb.AppendFormat(",ARTTITLE='{0}'", ClsSql.EncodeSql(m.ARTTITLE));
            sb.AppendFormat(",ARTTAG='{0}'", ClsSql.EncodeSql(m.ARTTAG));
            //sb.AppendFormat(",ARTTIME='{0}'", ClsSql.EncodeSql(m.ARTTIME));
            sb.AppendFormat(",ARTCONTENT='{0}'", ClsSql.EncodeSql(m.ARTCONTENT));
            sb.AppendFormat(",ARTCHECKSTATUS='{0}'", ClsSql.EncodeSql(m.ARTCHECKSTATUS));
            sb.AppendFormat(",ARTADDUSERID='{0}'", ClsSql.EncodeSql(m.ARTADDUSERID));
            sb.AppendFormat(",ARTCHECKTIME='{0}'", ClsSql.EncodeSql(m.ARTCHECKTIME));
            sb.AppendFormat(",ARTCHECKUSERID='{0}'", ClsSql.EncodeSql(m.ARTCHECKUSERID));
            sb.AppendFormat(",PLANFILENAME='{0}'", ClsSql.EncodeSql(m.PLANFILENAME));
            sb.AppendFormat(",BYORGNO='{0}'", ClsSql.EncodeSql(m.BYORGNO));
            sb.AppendFormat(" where ARTID= '{0}'", ClsSql.EncodeSql(m.ARTID));
            bool bln = DataBaseClass.ExeSql(sb.ToString());

            if (bln == true)
            {
                return(new Message(true, "修改成功!", ""));
            }
            else
            {
                return(new Message(false, "修改失败,请检查各输入框是否正确!", ""));
            }
        }
Beispiel #25
0
        /// <summary>
        /// 修改用户最后操作时间
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message MdyLastOpTime(T_SYSSEC_IPSUSER_Model m)
        {
            //判断用户序号是否存在于系统扩展表中
            if (T_SYSSEC_USER.isExists(new T_SYSSEC_IPSUSER_SW {
                USERID = m.USERID
            }) == false)
            {
                return(new Message(false, "修改失败,系统用户不存在!", ""));
            }
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("update T_SYSSEC_USER");
            sb.AppendFormat(" set ");
            sb.AppendFormat(" LASTOPTIME='{0}'", ClsSql.EncodeSql(PublicClassLibrary.ClsSwitch.SwitTM(DateTime.Now)));
            sb.AppendFormat(" where USERID= '{0}'", ClsSql.EncodeSql(m.USERID));
            bool bln = DataBaseClass.ExeSql(sb.ToString());

            if (bln == true)
            {
                return(new Message(true, "修改成功!", ""));
            }
            else
            {
                return(new Message(false, "修改失败,请检查各输入框是否正确!", ""));
            }
        }
Beispiel #26
0
        /// <summary>
        /// 管理
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Man(JC_PERALARM_Model m)
        {
            if (string.IsNullOrEmpty(m.MANTIME))
            {
                m.MANTIME = ClsSwitch.SwitTM(DateTime.Now);
            }
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("UPDATE JC_PERALARM");
            sb.AppendFormat(" set ");
            sb.AppendFormat("MANSTATE='{0}'", ClsSql.EncodeSql(m.MANSTATE));
            sb.AppendFormat(",MANRESULT='{0}'", ClsSql.EncodeSql(m.MANRESULT));
            sb.AppendFormat(",MANTIME='{0}'", ClsSql.EncodeSql(m.MANTIME));
            sb.AppendFormat(",MANUSERID='{0}'", ClsSql.EncodeSql(m.MANUSERID));
            sb.AppendFormat(" where PERALARMID= '{0}'", ClsSql.EncodeSql(m.PERALARMID));

            bool bln = DataBaseClass.ExeSql(sb.ToString());

            if (bln == true)
            {
                return(new Message(true, "修改成功!", ""));
            }
            else
            {
                return(new Message(false, "修改失败,请检查各输入框是否正确!", ""));
            }
        }
Beispiel #27
0
        /// <summary>
        /// 获取数据列表
        /// </summary>
        /// <param name="sw">参见模型</param>
        /// <returns>参见模型</returns>
        public static DataTable getDT(PEST_REPORT_SCXCBFZMX_SW sw)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("SELECT * FROM PEST_REPORT_SCXCBFZMX WHERE 1=1");
            if (!string.IsNullOrEmpty(sw.PEST_REPORT_SCXCBFZMXID))
            {
                sb.AppendFormat(" AND PEST_REPORT_SCXCBFZMXID = '{0}'", ClsSql.EncodeSql(sw.PEST_REPORT_SCXCBFZMXID));
            }
            if (!string.IsNullOrEmpty(sw.PEST_REPORT_SCXCBFZID))
            {
                sb.AppendFormat(" AND PEST_REPORT_SCXCBFZID = '{0}'", ClsSql.EncodeSql(sw.PEST_REPORT_SCXCBFZID));
            }
            if (!string.IsNullOrEmpty(sw.SCXCBFZMXTYPEID))
            {
                sb.AppendFormat(" AND SCXCBFZMXTYPEID = '{0}'", ClsSql.EncodeSql(sw.SCXCBFZMXTYPEID));
            }
            if (!string.IsNullOrEmpty(sw.SCXCBFZMXTYPEVALUE))
            {
                sb.AppendFormat(" AND SCXCBFZMXTYPEVALUE = '{0}'", ClsSql.EncodeSql(sw.SCXCBFZMXTYPEVALUE));
            }
            DataSet ds = DataBaseClass.FullDataSet(sb.ToString());

            return(ds.Tables[0]);
        }
Beispiel #28
0
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Add(JC_PERALARM_Model m)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("INSERT INTO  JC_PERALARM(FIRENAME,BYORGNO,PERALARMPHONE, PERALARMNAME, PERALARMTIME, PERALARMADDRESS, PERALARMCONTENT ,MANSTATE , MANRESULT, MANTIME, MANUSERID,JD, WD, PEARLARMPRE)");
            sb.AppendFormat("VALUES(");
            sb.AppendFormat("'{0}'", ClsSql.EncodeSql(m.FIRENAME));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.BYORGNO));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.PERALARMPHONE));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.PERALARMNAME));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.PERALARMTIME));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.PERALARMADDRESS));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.PERALARMCONTENT));
            sb.AppendFormat(",{0}", ClsSql.saveNullField(m.MANSTATE));
            sb.AppendFormat(",{0}", ClsSql.saveNullField(m.MANRESULT));
            sb.AppendFormat(",{0}", ClsSql.saveNullField(m.MANTIME));
            sb.AppendFormat(",{0}", ClsSql.saveNullField(m.MANUSERID));
            sb.AppendFormat(",{0}", ClsSql.saveNullField(m.JD));
            sb.AppendFormat(",{0}", ClsSql.saveNullField(m.WD));
            sb.AppendFormat(",{0}", ClsSql.saveNullField(m.PEARLARMPRE));
            //sb.AppendFormat(",{0}", ClsSql.saveNullField(m.PEARLARMISSUED));
            sb.AppendFormat(")");
            bool bln = DataBaseClass.ExeSql(sb.ToString());

            if (bln == true)
            {
                return(new Message(true, "添加成功!", ""));
            }
            else
            {
                return(new Message(false, "添加失败,请检查各输入框是否正确!", ""));
            }
        }
Beispiel #29
0
        /// <summary>
        /// 报警处理
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Man(T_IPS_ALARM_Model m)
        {
            if (string.IsNullOrEmpty(m.ALARMID))
            {
                return(new Message(false, "修改失败,请选择要处理的记录!", ""));
            }
            StringBuilder sb = new StringBuilder();

            //(ORGNO,LOGINUSERNAME,USERNAME,USERPWD,REGISTERTIME,LOGINNUM,NOTE)
            sb.AppendFormat("UPDATE T_IPS_ALARM");
            sb.AppendFormat(" set ");
            sb.AppendFormat(" ALARMCONTENT='{0}'", ClsSql.EncodeSql(m.ALARMCONTENT));
            sb.AppendFormat(" ,MANSTATE='{0}'", "1");
            sb.AppendFormat(" ,MANRESULT='{0}'", ClsSql.EncodeSql(m.MANRESULT));
            sb.AppendFormat(" ,MANTIME='{0}'", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            sb.AppendFormat(" ,MANUSERID='{0}'", SystemCls.getUserID());
            sb.AppendFormat(" where  ALARMID= '{0}'", ClsSql.EncodeSql(m.ALARMID));

            bool bln = DataBaseClass.ExeSql(sb.ToString());

            if (bln == true)
            {
                return(new Message(true, "处理成功!", ""));
            }
            else
            {
                return(new Message(false, "处理失败,请检查各输入框是否正确!", ""));
            }
        }
Beispiel #30
0
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Add(PEST_REPORT_DIEPINESURVEY_Model m)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("INSERT INTO PEST_REPORT_DIEPINESURVEY(BYORGNO, FINDER, FINDDATE, LINKTELL, DIEPINECOUNT, REPORTDATE, SAMPLINGCOUNT, AUTHENTICATERESULT)");
            sb.AppendFormat(" VALUES(");
            sb.AppendFormat("'{0}'", ClsSql.EncodeSql(m.BYORGNO));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.FINDER));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.FINDDATE));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.LINKTELL));
            sb.AppendFormat(",{0}", ClsSql.saveNullField(m.DIEPINECOUNT));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.REPORTDATE));
            sb.AppendFormat(",'{0}'", ClsSql.EncodeSql(m.SAMPLINGCOUNT));
            sb.AppendFormat(",{0}", ClsSql.saveNullField(m.AUTHENTICATERESULT));
            sb.AppendFormat(")");
            bool bln = DataBaseClass.ExeSql(sb.ToString());

            if (bln == true)
            {
                return(new Message(true, "添加成功!", m.returnUrl));
            }
            else
            {
                return(new Message(false, "添加失败,请检查各输入框是否正确!", m.returnUrl));
            }
        }