Exemplo n.º 1
0
        public bool UpdateOptionParameter(SysSystemParameter obj)
        {
            bool   flag = false;
            string sql  = string.Format("update sys_SystemParameter set ParameterName='{0}',ParameterValue='{1}',ParameterText='{2}',Description='{3}',State='{4}' where SystemParameterID={5}"
                                        , obj.ParameterName, obj.ParameterValue, obj.ParameterText, obj.Description, obj.State, obj.SystemParameterID);

            using (PersistentManager persistentManager = new PersistentManager())
            {
                SysSystemParameterDao paraDao = new SysSystemParameterDao();
                paraDao.SetData(sql);
                flag = true;
            }
            return(flag);
        }
Exemplo n.º 2
0
        public bool InsertOptionParameter(SysSystemParameter obj)
        {
            bool   flag = false;
            string sql  = string.Format("insert into sys_SystemParameter (ParameterName,ParameterValue,ParameterText,Description,State,ParameterType) values('{0}','{1}','{2}','{3}','{4}','{5}')"
                                        , obj.ParameterName, obj.ParameterValue, obj.ParameterText, obj.Description, obj.State, "1");

            using (PersistentManager persistentManager = new PersistentManager())
            {
                SysSystemParameterDao paraDao = new SysSystemParameterDao();
                paraDao.SetData(sql);
                flag = true;
            }
            return(flag);
        }
Exemplo n.º 3
0
        public DataSet SearchParameter(SysSystemParameter obj)
        {
            string strSql = string.Format(" select SystemParameterID , ParameterName,ParameterValue , ParameterText," +
                                          " Description , State" +
                                          " from sys_SystemParameter  where ParameterType='1'  and ParameterName like '%{0}%'" +
                                          " and ParameterValue like '%{1}%'" +
                                          " and ParameterText like'%{2}%'" +
                                          " and Description like '%{3}%'" +
                                          " and State like '%{4}%' order by ParameterName ", obj.ParameterName, obj.ParameterValue, obj.ParameterText, obj.Description, obj.State);

            using (PersistentManager persistentManager = new PersistentManager())
            {
                SysSystemParameterDao paraDao = new SysSystemParameterDao();
                return(paraDao.GetData(strSql));
            }
        }