示例#1
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void DelInfoCheckTable(string t)
        {
            string       strSql = "delete from M_GenSetInfoCheck where InfoCheckTable=@table";
            SqlParameter p1     = new SqlParameter("@table", t);

            SQLHelper.ExecScalar(strSql, p1);
        }
示例#2
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void DelContenTable(string str)
        {
            string       strSql = "delete from M_GenSetConten where ContenModule=@table";
            SqlParameter p0     = new SqlParameter("@table", str);

            SQLHelper.ExecScalar(strSql, p0);
        }
示例#3
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void DeleteHouse()
        {
            string       strSqlDel = "delete from M_HouseName where HouseID = @HouseID";
            SqlParameter p         = new SqlParameter("@HouseID", V_HouseName.HouseSetid);

            SQLHelper.ExecScalar(strSqlDel, p);
        }
示例#4
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void UpdateBorrInfo(string table, string str, bool tag, string time)
        {
            string strSql = "select count(*) from M_GenSetBorr";
            int    id     = Convert.ToInt32(SQLHelper.ExecScalar(strSql));

            if (id == 0)
            {
                strSql = "INSERT INTO dbo.M_GenSetBorr (Tablename, Tabcolname, Timecol )VALUES  (@table,@info,@time)";
                SqlParameter p0 = new SqlParameter("@table", table);
                SqlParameter p1 = new SqlParameter("@info", str);
                SqlParameter p2 = new SqlParameter("@time", time);
                SQLHelper.ExecScalar(strSql, p0, p1, p2);
            }
            else
            {
                strSql = "update M_GenSetBorr set Tablename=@table, Tabcolname=@info, Timecol=@time";
                SqlParameter p0 = new SqlParameter("@table", table);
                SqlParameter p1 = new SqlParameter("@info", str);
                SqlParameter p2 = new SqlParameter("@time", time);
                SQLHelper.ExecScalar(strSql, p0, p1, p2);
            }
            if (!tag)
            {
                strSql = "alter table " + table + " add BorrTag varchar(10)";
                SQLHelper.ExecScalar(strSql);
            }
        }
示例#5
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void DelContePageSet(int id)
        {
            string       strSql = "Delete from M_ContenPageSet where Id=@id";
            SqlParameter p1     = new SqlParameter("@id", id);

            SQLHelper.ExecScalar(strSql, p1);
        }
示例#6
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
 public static void SaveModuleSofte(bool t)
 {
     if (t == false)
     {
         string       strSql = "select id from M_Soid where Msoid=@Msoid ";
         SqlParameter p1     = new SqlParameter("@Msoid", T_addModule.T_id);
         int          count  = Convert.ToInt32(SQLHelper.ExecScalar(strSql, p1));
         strSql = "Psoftid";
         SqlParameter[] p = new SqlParameter[6];
         p[0] = new SqlParameter("@Msoid", T_addModule.T_id);
         p[1] = new SqlParameter("@Msosn", T_addModule.T_sn);
         p[2] = new SqlParameter("@Msotm", T_addModule.T_time);
         if (count > 0)
         {
             p[3] = new SqlParameter("@id", 2);
         }
         else
         {
             p[3] = new SqlParameter("@id", 1);
         }
         p[4] = new SqlParameter("@userid", T_User.UserId);
         p[5] = new SqlParameter("@Mwtime", DESEncrypt.DesEncrypt(T_addModule.T_timecs));
         SQLHelper.ExecuteNonQuery(strSql, CommandType.StoredProcedure, p);
     }
     else
     {
         string       strSql = "update M_Soid set Msotm=@time ";
         SqlParameter p1     = new SqlParameter("@time", T_addModule.T_time);
         SQLHelper.ExecScalar(strSql, p1);
     }
     Common.Writelog(0, "修改软件授权时间" + T_addModule.T_time);
 }
示例#7
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void SaveModule()
        {
            string       strSql = "select id from M_Moudule where ModuleChName=@ModuleChName";
            SqlParameter p1     = new SqlParameter("@ModuleChName", T_addModule.T_moduleChName);
            int          count  = Convert.ToInt32(SQLHelper.ExecScalar(strSql, p1));

            strSql = "PInserModule";
            SqlParameter[] p = new SqlParameter[8];
            p[0] = new SqlParameter("@userid", T_User.UserId);
            p[1] = new SqlParameter("@ModuleName", DESEncrypt.DesEncrypt(T_addModule.T_moduleName));
            p[2] = new SqlParameter("@ModuleChName", T_addModule.T_moduleChName);
            p[3] = new SqlParameter("@ModuleInt", T_addModule.T_moduleInt);
            p[4] = new SqlParameter("@ModuleImgIdx", T_addModule.T_moduleImgIdx);
            p[5] = new SqlParameter("@ModuleFileName", DESEncrypt.DesEncrypt(T_addModule.T_moduleFileName));
            p[6] = new SqlParameter("@id", count);
            if (count > 0)
            {
                p[7] = new SqlParameter("@stat", 2);
            }
            else
            {
                p[7] = new SqlParameter("@stat", 1);
            }
            SQLHelper.ExecuteNonQuery(strSql, CommandType.StoredProcedure, p);
            Common.Writelog(0, "增加模块:" + T_addModule.T_moduleChName);
        }
示例#8
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void DelDataSplitExportTable(string t)
        {
            string       strSql = "delete from M_GenSetDataSplitTable where ImportTable=@table";
            SqlParameter p1     = new SqlParameter("@table", t);

            SQLHelper.ExecScalar(strSql, p1);
        }
示例#9
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void InsterGensetPrintConten(string table, string info)
        {
            string       strSql = "insert into M_genset (PrintContenTable, PrintContenInfo) values (@table,@info)";
            SqlParameter p0     = new SqlParameter("@table", table);
            SqlParameter p1     = new SqlParameter("@info", info);

            SQLHelper.ExecScalar(strSql, p0, p1);
        }
示例#10
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void DelModuelSys(string name)
        {
            string       strSql = "delete from  M_Moudule  where ModuleChName=@name";
            SqlParameter p1     = new SqlParameter("@name", name);

            SQLHelper.ExecScalar(strSql, p1);
            Common.Writelog(0, "永久禁用模块" + name);
        }
示例#11
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void SaveGensetImport(string table, string info)
        {
            string       strSql = "insert into  M_GenSetImport  (ImportTable,ImportInfoZd) values(@table,@info)";
            SqlParameter p0     = new SqlParameter("@table", table);
            SqlParameter p1     = new SqlParameter("@info", info);

            SQLHelper.ExecScalar(strSql, p0, p1);
        }
示例#12
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void DelMenuSet(int id, string name)
        {
            string       strSql = "delete from M_MouduleMain where id=@id";
            SqlParameter p1     = new SqlParameter("@id", id);

            SQLHelper.ExecScalar(strSql, p1);
            Common.Writelog(0, "删除菜单:" + name);
        }
示例#13
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static bool IsCheckUser(string user)
        {
            string       strSql = "select count(*) from M_User where  UserName=@UserName";
            SqlParameter p1     = new SqlParameter("@UserName", user);
            bool         i      = Convert.ToBoolean(SQLHelper.ExecScalar(strSql, p1));

            return(i);
        }
示例#14
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void UpdateGensetPrintConten(string table, string info)
        {
            string       strSql = "update M_genset set PrintContenTable=@table, PrintContenInfo=@info";
            SqlParameter p0     = new SqlParameter("@table", table);
            SqlParameter p1     = new SqlParameter("@info", info);

            SQLHelper.ExecScalar(strSql, p0, p1);
        }
示例#15
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void InsterContePageSet(string tit, string page)
        {
            string       strSql = "INSERT INTO dbo.M_ContenPageSet (Title, Page)VALUES  (@title, @page)";
            SqlParameter p0     = new SqlParameter("@title", tit);
            SqlParameter p1     = new SqlParameter("@page", page);

            SQLHelper.ExecScalar(strSql, p0, p1);
        }
示例#16
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void UpdateGensetImport(string table, string info)
        {
            string       strSql = "update M_GenSetImport set ImportInfoZd=@info where ImportTable=@table";
            SqlParameter p0     = new SqlParameter("@table", table);
            SqlParameter p1     = new SqlParameter("@info", info);

            SQLHelper.ExecScalar(strSql, p0, p1);
        }
示例#17
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void SaveDataSplitExport(string table, string info, string xlsid)
        {
            string       strSql = "insert into  M_GenSetDataSplitTable  (ImportTable,ImportCol,BindId) values(@table,@info,@xlsid)";
            SqlParameter p0     = new SqlParameter("@table", table);
            SqlParameter p1     = new SqlParameter("@info", info);
            SqlParameter p2     = new SqlParameter("@xlsid", xlsid);

            SQLHelper.ExecScalar(strSql, p0, p1, p2);
        }
示例#18
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void UpUserPwd(string pwd)
        {
            string       strSql  = "update M_user set UserPwd=@UserPwd where id=@id ";
            SqlParameter p1      = new SqlParameter("@id", T_User.UserId);
            string       userpwd = DESEncrypt.DesEncrypt(pwd);
            SqlParameter p2      = new SqlParameter("@UserPwd", userpwd);

            SQLHelper.ExecScalar(strSql, p1, p2);
        }
示例#19
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void UpdateDataSplitExport(string table, string info, string xlsid)
        {
            string       strSql = "update M_GenSetDataSplitTable set ImportCol=@info, BindId=@xlsid  where ImportTable=@table";
            SqlParameter p0     = new SqlParameter("@table", table);
            SqlParameter p1     = new SqlParameter("@info", info);
            SqlParameter p2     = new SqlParameter("@xlsid", xlsid);

            SQLHelper.ExecScalar(strSql, p0, p1, p2);
        }
示例#20
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void UpdateQuerInfo(string table, string str, int enter)
        {
            string       strSql = "update M_genset set QuerTable=@table, QuerInfoZd=@info,QuerEnter=@enter";
            SqlParameter p0     = new SqlParameter("@table", table);
            SqlParameter p1     = new SqlParameter("@info", str);
            SqlParameter p2     = new SqlParameter("enter", enter);

            SQLHelper.ExecScalar(strSql, p0, p1, p2);
        }
示例#21
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static bool IsCheckUser(string user, string pwd)
        {
            string       strSql  = "select count(*) from M_User where  UserName=@UserName and UserPwd=@UserPwd";
            SqlParameter p1      = new SqlParameter("@UserName", user);
            string       userpwd = DESEncrypt.DesEncrypt(pwd);
            SqlParameter p2      = new SqlParameter("@UserPwd", userpwd);
            bool         i       = Convert.ToBoolean(SQLHelper.ExecScalar(strSql, p1, p2));

            return(i);
        }
示例#22
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
 public static int GetHouseGuiMax(int id)
 {
     try {
         string       strSql = "select max(HouseGui) from M_HouseSet where  Houseid=@HouseID ";
         SqlParameter p1     = new SqlParameter("@HouseID", id);
         int          box    = Convert.ToInt32(SQLHelper.ExecScalar(strSql, p1));
         return(box);
     } catch {
         return(0);
     }
 }
示例#23
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void InsterGensetPrint(string table, string xy, string col, string fontall, string fontspec)
        {
            string       strSql = "insert into  M_genset  (printTable,PrintxyCol,PrintColInfo,PrintFontColAll,PrintFontSpec) values(@table,@xy,@col,@fontall,@fontspec)";
            SqlParameter p0     = new SqlParameter("@table", table);
            SqlParameter p1     = new SqlParameter("@xy", xy);
            SqlParameter p2     = new SqlParameter("@col", col);
            SqlParameter p3     = new SqlParameter("@fontall", fontall);
            SqlParameter p4     = new SqlParameter("@fontspec", fontspec);

            SQLHelper.ExecScalar(strSql, p0, p1, p2, p3, p4);
        }
示例#24
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
 public static string isTable(string table)
 {
     try {
         string       strSql = "SELECT table_name FROM information_schema.TABLES WHERE table_name =@table";
         SqlParameter p1     = new SqlParameter("@table", table);
         string       tab    = SQLHelper.ExecScalar(strSql, p1).ToString();
         return(tab);
     } catch {
         return("");
     }
 }
示例#25
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void UpdateGensetPrint(string table, string xy, string col, string fontall, string fontspec)
        {
            string       strSql = "update M_genset set printTable=@table, PrintxyCol=@xy,PrintColInfo=@col ,PrintFontColAll=@fontall,PrintFontSpec=@fontspec";
            SqlParameter p0     = new SqlParameter("@table", table);
            SqlParameter p1     = new SqlParameter("@xy", xy);
            SqlParameter p2     = new SqlParameter("@col", col);
            SqlParameter p3     = new SqlParameter("@fontall", fontall);
            SqlParameter p4     = new SqlParameter("@fontspec", fontspec);

            SQLHelper.ExecScalar(strSql, p0, p1, p2, p3, p4);
        }
示例#26
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void UpdateGensetInfoCheck(string table, string info, string msg)
        {
            string strSql = "update M_GenSetInfoCheck set InfocheckCol=@col, InfoCheckMsg=@msg where InfoCheckTable=@table";

            SqlParameter[] par =
            {
                new SqlParameter("@table", table),
                new SqlParameter("@col",   info),
                new SqlParameter("@msg",   msg)
            };
            SQLHelper.ExecScalar(strSql, par);
        }
示例#27
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void SaveGensetInfoCheck(string table, string info, string msg)
        {
            string strSql = "insert into  M_GenSetInfoCheck  (InfoCheckTable,InfocheckCol,InfoCheckMsg) values(@table,@info,@msg)";

            SqlParameter[] par =
            {
                new SqlParameter("@table", table),
                new SqlParameter("@info",  info),
                new SqlParameter("@msg",   msg)
            };
            SQLHelper.ExecScalar(strSql, par);
        }
示例#28
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
 public static int Getboxsnimage(int boxsnq, int boxsnz)
 {
     try {
         string       strSql = "select COUNT( IMGFILE)  from T_IMAGEFILE where BOXSN>@boxsnq and  BOXSN<@boxsnz";
         SqlParameter p1     = new SqlParameter("@boxsnq", boxsnq);
         SqlParameter p2     = new SqlParameter("@boxsnz", boxsnz);
         int          i      = Convert.ToInt32(SQLHelper.ExecScalar(strSql, p1, p2));
         return(i);
     } catch {
         return(0);
     }
 }
示例#29
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static int SelectHouseNameid(string name)
        {
            string       strSql = "select id from M_HouseName where HouseName=@HouseName ";
            SqlParameter p1     = new SqlParameter("@HouseName", name);
            object       obj    = SQLHelper.ExecScalar(strSql, p1);

            if (obj == null)
            {
                return(0);
            }
            int id = Convert.ToInt32(obj.ToString());

            return(id);
        }
示例#30
0
文件: T_Sysset.cs 项目: Ghcsm/Wh_Fzg
        public static void UPdateDataSplitFileInfo(string filetable, int filesn, string filename, bool filebool, string filecol)
        {
            string strSql = "update M_GenSetDataSplit set FileTable=@filetable,Filesn=@filesn,FileName=@filename,FileBool=@filebool,FileNamecol=@filecol";

            SqlParameter[] par =
            {
                new SqlParameter("@filetable", filetable),
                new SqlParameter("@filesn",    filesn.ToString()),
                new SqlParameter("@filename",  filename),
                new SqlParameter("@filebool",  filebool.ToString()),
                new SqlParameter("@filecol",   filecol.ToString())
            };
            SQLHelper.ExecScalar(strSql, par);
        }