Beispiel #1
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        public DataTable getData2(string s)
        {
            string    sql = "select * into temp4 from " + s + "";
            DataTable dt  = SQLHelper.ExecuteDt(base.User_Admin, sql, null);

            return(dt);
        }
Beispiel #2
0
        /// <summary>
        /// 选择查询
        /// </summary>
        /// <param name="pWhere"></param>
        /// <returns></returns>
        public DataTable selectData(string pWhere, string pData)
        {
            string sql = "select a.*,b.* from zuce a join xinxi b on a.shenfenzheng=b.shenfenzheng";

            switch (pWhere)
            {
            case "shenfenzheng":
                sql = sql + " where a.shenfenzheng=@data";
                break;

            case "xingming":
                pData = "%" + pData + "%";
                sql   = sql + " where b.xingming like @data";
                break;

            default:
                sql = sql + " where a.shenfenzheng=@data";
                break;
            }
            SqlParameter[] param = new SqlParameter[]
            {
                new SqlParameter("@data", SqlDbType.VarChar, 20)
            };
            param[0].Value = pData;
            DataTable dt = SQLHelper.ExecuteDt(base.User_Login, sql, param);

            return(dt);
        }
Beispiel #3
0
        /// <summary>
        /// 查询应用
        /// </summary>
        /// <returns></returns>
        public DataTable chaxun()
        {
            string    sql = "select distinct yingyong from gongneng";// where xingming=@xingming
            DataTable dt  = SQLHelper.ExecuteDt(base.User_Login, sql, null);

            return(dt);
        }
Beispiel #4
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        public DataTable getData9(string a)
        {
            string    sql = "select * from yonghu where daihao= " + a + "";
            DataTable dt  = SQLHelper.ExecuteDt(base.User_Admin, sql, null);

            return(dt);
        }
Beispiel #5
0
        /// <summary>
        /// 查询xt_tongji
        /// </summary>
        /// <returns></returns>
        public DataTable getData()
        {
            string    sql = "select * from xt_tongji";
            DataTable dt  = SQLHelper.ExecuteDt(base.User_Login, CommandType.Text, sql, null);

            return(dt);
        }
Beispiel #6
0
        public DataTable getGongneng()
        {
            string    sql = "select * from gongneng ";
            DataTable dt  = SQLHelper.ExecuteDt(base.User_Login, sql, null);

            return(dt);
        }
Beispiel #7
0
        /// <summary>
        /// 按条件提取数据
        /// </summary>
        /// <param name="pWhere"></param>
        /// <param name="pData"></param>
        /// <returns></returns>
        public DataTable getDataWhere(string pWhere, string pData)
        {
            string sql = "select * from caidan ";

            switch (pWhere)
            {
            case "yonghu":
                sql = sql + " where yonghu=@data ";
                break;

            case "xuhao":
                sql = sql + " where xuhao=@data ";
                break;

            default:
                sql = sql + " where xuhao=@data ";
                break;
            }
            sql = sql + " order by xuhao;";
            SqlParameter[] param = new SqlParameter[] { new SqlParameter("@data", SqlDbType.VarChar) };
            param[0].Value = pData;
            DataTable dt = SQLHelper.ExecuteDt(base.User_Login, sql, param);

            return(dt);
        }
Beispiel #8
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        public DataTable getData()
        {
            string sql = "select a.*,b.* from zuce a join xinxi b on a.shenfenzheng=b.shenfenzheng";

            DataTable dt = SQLHelper.ExecuteDt(base.User_Login, sql, null);

            return(dt);
        }
Beispiel #9
0
        /// <summary>
        /// 查询表字段
        /// </summary>
        /// <returns></returns>
        public DataTable getData1()
        {
            string sql = "Select name FROM SysColumns Where id=Object_Id('yonghu');";

            DataTable dt = SQLHelper.ExecuteDt(base.User_Login, sql, null);

            return(dt);
        }
Beispiel #10
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        public DataTable getData()
        {
            string sql = "select * from yonghu   ;";

            DataTable dt = SQLHelper.ExecuteDt(base.User_Login, sql, null);

            return(dt);
        }
Beispiel #11
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        public DataTable getData4(string a)
        {
            //[自动编号字段] int IDENTITY (1,1) PRIMARY KEY ,
            string    sql = " create table [temp5] ( [" + a + "] nVarChar(50) default '默认值' null )";
            DataTable dt  = SQLHelper.ExecuteDt(base.User_Admin, sql, null);

            return(dt);
        }
Beispiel #12
0
        /// <summary>
        /// 提取上传数据
        /// </summary>
        /// <returns></returns>
        public DataTable getData_Import()
        {
            string sql = "select * from zm_cjzm where xuhao in (select xh from temp_data) order by xuhao ;";

            DataTable dt = SQLHelper.ExecuteDt(base.User_Login, sql, null);

            return(dt);
        }
Beispiel #13
0
        /// <summary>
        /// 查询应用
        /// </summary>
        /// <returns></returns>
        public DataTable chaxun(string Table)
        {
            string sql = "select  *  from " + Table + "";//

            SqlParameter[] param = new SqlParameter[] { new SqlParameter("@xingming", SqlDbType.VarChar) };
            param[0].Value = Table;
            DataTable dt = SQLHelper.ExecuteDt(base.User_Login, sql, param);

            return(dt);
        }
Beispiel #14
0
        /// <summary>
        /// 用户菜单
        /// </summary>
        /// <param name="pYingyong"></param>
        /// <returns></returns>
        public DataTable getDataCaidan(string pYingyong)
        {
            string sql = "select *,left(bianhao,2) zu1,right(bianhao,4) zu2 from caidan where yingyong=@yingyong  order by bianhao;";

            SqlParameter[] param = new SqlParameter[] { new SqlParameter("@yingyong", SqlDbType.VarChar) };
            param[0].Value = pYingyong;
            DataTable dt = SQLHelper.ExecuteDt(base.User_Login, CommandType.Text, sql, param);

            return(dt);
        }
Beispiel #15
0
        /// <summary>
        /// getalldate
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>
        public DataTable getalldate(string p)
        {
            string sql = "select *from zm_cjzm where xuhao like @xuhao";

            SqlParameter[] param = new SqlParameter[] { new SqlParameter("@xuhao", SqlDbType.VarChar, 20) };
            param[0].Value = p;
            DataTable dt = SQLHelper.ExecuteDt(base.User_Login, sql, param);

            return(dt);
        }
Beispiel #16
0
        /// <summary>
        /// 查询应用
        /// </summary>
        /// <returns></returns>
        public DataTable getChaxun(string pZubie)
        {
            string sql = "select daihao ,mingcheng  from  yonghu where  zubie=@zubie ";

            SqlParameter[] para = new SqlParameter[1];
            para[0] = new SqlParameter("@zubie", pZubie);
            DataTable dt = SQLHelper.ExecuteDt(base.User_Admin, sql, para);

            return(dt);
        }
Beispiel #17
0
        public DataTable  getYingyong(string pYingyong)
        {
            string sql = "select * from caidan where yingyong=@pYingyong ";

            SqlParameter[] param = new SqlParameter[] { new SqlParameter("@pYingyong", SqlDbType.VarChar) };
            param[0].Value = pYingyong;
            DataTable dt = SQLHelper.ExecuteDt(base.User_Login, sql, param);

            return(dt);
        }
Beispiel #18
0
        public DataTable chaxun(string p)
        {
            string sql = "select *from zm_cjzm";// where xingming=@xingming

            SqlParameter[] param = new SqlParameter[] { new SqlParameter("@xingming", SqlDbType.VarChar) };
            param[0].Value = p;

            DataTable dt = SQLHelper.ExecuteDt(base.User_Login, sql, param);

            return(dt);
        }
Beispiel #19
0
        public DataTable selectData(string zhanghao, string mima)
        {
            string sql = "select *from hx_yonghu where zhanghao=@zhanghao and mima=@mima";

            SqlParameter[] param = new SqlParameter[] { new SqlParameter("@zhanghao", SqlDbType.VarChar, 20),
                                                        new SqlParameter("@mima", SqlDbType.VarChar, 20) };
            param[0].Value = zhanghao;
            param[1].Value = mima;
            DataTable dt = SQLHelper.ExecuteDt(base.User_Login, sql, param);

            return(dt);
        }
Beispiel #20
0
        /// <summary>
        /// 获取证书
        /// </summary>
        /// <param name="pXuhao"></param>
        /// <param name="pKaoshenghao"></param>
        /// <returns></returns>
        public DataTable getData(string pXuhao, string pShenfenzheng)
        {
            string sql = "select * from zm_cjzm where xuhao=@xuhao and shenfenzheng=@shenfenzheng;";

            SqlParameter[] param = new SqlParameter[] { new SqlParameter("@xuhao", SqlDbType.VarChar),
                                                        new SqlParameter("@shenfenzheng", SqlDbType.VarChar) };
            param[0].Value = pXuhao;
            param[1].Value = pShenfenzheng;
            DataTable dt = SQLHelper.ExecuteDt(base.User_Login, sql, param);

            return(dt);
        }
Beispiel #21
0
        public DataTable getDate(string xingming, string shenfenzheng)
        {
            string sql = "select *from zm_cjzm where xingming=@xingming and shenfenzheng=@shenfenzheng";

            SqlParameter[] param = new SqlParameter[]
            { new SqlParameter("@xingming", SqlDbType.VarChar, 20),
              new SqlParameter("@shenfenzheng", SqlDbType.VarChar, 20) };
            param[0].Value = xingming;
            param[1].Value = shenfenzheng;
            DataTable dt = SQLHelper.ExecuteDt(base.User_Login, sql, param);

            return(dt);
        }
Beispiel #22
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        public DataTable getData(string yonghu)
        {
            string sql = "select a.*,b.* from zuce a join xinxi b on a.shenfenzheng=b.shenfenzheng where a.yonghu=@yonghu";

            SqlParameter[] param = new SqlParameter[]
            {
                new SqlParameter("@yonghu", SqlDbType.VarChar, 20)
            };
            param[0].Value = yonghu;
            DataTable dt = SQLHelper.ExecuteDt(base.User_Login, sql, param);

            return(dt);
        }
Beispiel #23
0
        /// <summary>
        ///  查询账户
        /// </summary>
        /// <param name="yonghu"></param>
        /// <param name="mima"></param>
        /// <returns></returns>
        public DataTable getData(string yonghu)
        {
            string sql = "select * from zuce where yonghu= @yonghu";

            SqlParameter[] param = new SqlParameter[]
            {
                new SqlParameter("@yonghu", SqlDbType.VarChar, 20)
            };
            param[0].Value = yonghu;
            DataTable dt = SQLHelper.ExecuteDt(base.User_Login, sql, param);

            return(dt);
        }
Beispiel #24
0
        /// <summary>
        /// 获取用户功能
        /// </summary>
        /// <param name="pYonghu">用户代号</param>
        /// <param name="pBianhao">菜单编号</param>
        /// <returns>DataTable</returns>
        public DataTable getGongneng_Bianhao(gongneng mGongneng)
        {
            string sql = "select * from gongneng where daihao=@daihao and yingyong=@yingyong and bianhao=@bianhao; ";

            SqlParameter[] param = new SqlParameter[] { new SqlParameter("@daihao", SqlDbType.VarChar, 20),
                                                        new SqlParameter("@yingyong", SqlDbType.VarChar, 20),
                                                        new SqlParameter("@bianhao", SqlDbType.VarChar, 6) };
            param[0].Value = mGongneng.Daihao;
            param[1].Value = mGongneng.Yingyong;
            param[2].Value = mGongneng.Bianhao;
            DataTable dt = SQLHelper.ExecuteDt(base.User_Admin, sql, param);

            return(dt);
        }
Beispiel #25
0
        /// <summary>
        /// 获取用户功能菜单
        /// </summary>
        /// <param name="pYonghu">用户代号</param>
        /// <param name="pCanshu">参数</param>
        /// <returns>返回DataTable</returns>
        public DataTable getGongneng_Yonghu(gongneng mGongneng)
        {
            string sql = "select *,left(bianhao,2)+'0000' fuxuhao from gongneng a where a.daihao=@daihao and yingyong=@yingyong and a.canshu0=@canshu order by a.xuhao ;";

            SqlParameter[] param = new SqlParameter[] { new SqlParameter("@daihao", SqlDbType.VarChar, 20),
                                                        new SqlParameter("@yingyong", SqlDbType.VarChar, 20),
                                                        new SqlParameter("@canshu", SqlDbType.VarChar, 1) };
            param[0].Value = mGongneng.Daihao;
            param[1].Value = mGongneng.Yingyong;
            param[2].Value = mGongneng.Canshu0;
            DataTable dt = SQLHelper.ExecuteDt(base.User_Admin, sql, param);

            return(dt);
        }
Beispiel #26
0
        /// <summary>
        /// 查询用户菜单
        /// </summary>
        /// <param name="daihao"></param>
        /// <returns></returns>
        public DataTable getCaidan(string pYingyong, string pYonghu)
        {
            string sql = "select a.*,left(a.bianhao,2) zu1,right(a.bianhao,4) zu2,b.jiancheng,b.url,b.image from gongneng a,caidan b " +
                         "where (a.yingyong=b.yingyong and  a.bianhao=b.bianhao) and a.yingyong=@yingyong and a.daihao=@daihao and a.canshu0='1'  " +
                         " order by left(b.bianhao,2),b.xuhao;";

            SqlParameter[] param = new SqlParameter[] { new SqlParameter("@yingyong", SqlDbType.VarChar),
                                                        new SqlParameter("@daihao", SqlDbType.VarChar) };
            param[0].Value = pYingyong;
            param[1].Value = pYonghu;

            DataTable dt = SQLHelper.ExecuteDt(base.User_Login, sql, param);

            return(dt);
        }
Beispiel #27
0
        public DataTable chaxunxuhao(string xuhao, string xingming)
        {
            string sql = "select *from zm_cjzm where xuhao like @xuhao and xingming like @xingming";

            SqlParameter[] param = new SqlParameter[]
            {
                new SqlParameter("@xuhao", SqlDbType.VarChar, 20),
                new SqlParameter("@xingming", SqlDbType.VarChar, 20)
            };
            param[0].Value = xuhao;
            param[1].Value = xingming;
            DataTable dt = SQLHelper.ExecuteDt(base.User_Login, sql, param);

            return(dt);
        }
Beispiel #28
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        public DataTable getData5(string a)
        {
            string sql = "ALTER TABLE [temp5] ADD ";

            switch (a)
            {
            //case "学校代号":
            //    sql=sql+" ["+a+"] NVARCHAR (50) NULL ;";
            //    break;
            //case "学校名称":
            //    sql = sql + " [" + a + "] NVARCHAR (50) NULL ;";
            //    break;
            //case "专业序号":
            //    sql = sql + " [" + a + "] NVARCHAR (50) NULL ;";
            //    break;
            //case "招生专业名称":
            //    sql = sql + " [" + a + "] NVARCHAR (50) NULL ;";
            //    break;
            //case "科类":
            //    sql = sql + " [" + a + "] NVARCHAR (50) NULL ;";
            //    break;
            //case "层次":
            //    sql = sql + " [" + a + "] NVARCHAR (50) NULL ;";
            //    break;
            //case "学制":
            //    sql = sql + " [" + a + "] NVARCHAR (50) NULL ;";
            //    break;
            //case "学费":
            //    sql = sql + " [" + a + "] NVARCHAR (50) NULL ;";
            //    break;
            //case "计划数":
            //    sql = sql + " [" + a + "] NVARCHAR (50) NULL ;";
            //    break;
            //case "备注":
            //    sql = sql + " [" + a + "] NVARCHAR (50) NULL ;";
            //    break;
            case "daihao":
                sql = sql + " [" + a + "] NVARCHAR (50) NULL ;";
                break;

            case "mingcheng":
                sql = sql + " [" + a + "] NVARCHAR (50) NULL ;";
                break;
            }
            DataTable dt = SQLHelper.ExecuteDt(base.User_Admin, sql, null);

            return(dt);
        }
Beispiel #29
0
        public DataTable getData3(string d, string m, string r, string b)
        {
            string sql = "insert into temp4(daihao,mingcheng,renshu,baoming)values(@d,@m,@r,@b)";

            SqlParameter[] param = new SqlParameter[] { new SqlParameter("@d", SqlDbType.VarChar, 50),
                                                        new SqlParameter("@m", SqlDbType.VarChar, 50),
                                                        new SqlParameter("@r", SqlDbType.VarChar, 50),
                                                        new SqlParameter("@b", SqlDbType.VarChar, 50) };
            param[0].Value = d;
            param[1].Value = m;
            param[2].Value = r;
            param[3].Value = b;
            DataTable dt = SQLHelper.ExecuteDt(base.User_Login, sql, param);

            return(dt);
        }