Beispiel #1
0
        /// <summary>根据userid得到管理员工信息</summary>
        public DbModels.manage getManage(XXF.Db.DbConn PubConn, string userid)
        {
            string  sql = "select ygbh,ygmc,ygmm,ygzt,sfsc from tb_userinfo where ygbh=@userid";
            DataSet ds  = new DataSet();

            XXF.Db.SimpleProcedureParameter para = new XXF.Db.SimpleProcedureParameter();
            para.Add("@userid", userid);
            PubConn.SqlToDataSet(ds, sql, para.ToParameters());
            if (ds.Tables[0].Rows.Count != 1)
            {
                return(null);
            }
            DbModels.manage model = new DbModels.manage();
            model.userid   = ds.Tables[0].Rows[0]["ygbh"].ToString();
            model.id       = model.userid;
            model.username = ds.Tables[0].Rows[0]["ygmc"].ToString();
            model.pwd      = privateToDeDES(ds.Tables[0].Rows[0]["ygmm"].ToString());
            model.freeze   = Convert.ToInt32(ds.Tables[0].Rows[0]["sfsc"]);
            if (model.freeze == 0)
            {
                model.freeze = 1;
            }
            else
            {
                model.freeze = 0;
            }
            return(model);
        }
Beispiel #2
0
 /// <summary>根据userid得到管理员工信息</summary>
 public DbModels.manage getManage(XXF.Db.DbConn PubConn, string userid)
 {
     string sql = "select ygbh,ygmc,ygmm,ygzt,sfsc from tb_userinfo where ygbh=@userid";
     DataSet ds = new DataSet();
     XXF.Db.SimpleProcedureParameter para = new XXF.Db.SimpleProcedureParameter();
     para.Add("@userid", userid);
     PubConn.SqlToDataSet(ds, sql, para.ToParameters());
     if (ds.Tables[0].Rows.Count != 1)
         return null;
     DbModels.manage model = new DbModels.manage();
     model.userid = ds.Tables[0].Rows[0]["ygbh"].ToString();
     model.id = model.userid;
     model.username = ds.Tables[0].Rows[0]["ygmc"].ToString();
     model.pwd = privateToDeDES(ds.Tables[0].Rows[0]["ygmm"].ToString());
     model.freeze = Convert.ToInt32(ds.Tables[0].Rows[0]["sfsc"]);
     if (model.freeze == 0)
     {
         model.freeze = 1;
     }
     else
     {
         model.freeze = 0;
     }
     return model;
 }
Beispiel #3
0
 /// <summary></summary>
 public DbModels.manage getUser(XXF.Db.DbConn PubConn, string userid)
 {
     string sql = "select f_id, f_yhzh,f_yhxm,f_dlmm,f_sfdj from tb_customer where f_yhzh=@userid";
     DataSet ds = new DataSet();
     XXF.Db.SimpleProcedureParameter para = new XXF.Db.SimpleProcedureParameter();
     para.Add("@userid", userid);
     PubConn.SqlToDataSet(ds, sql, para.ToParameters());
     if (ds.Tables[0].Rows.Count != 1)
         return null;
     DbModels.manage model = new DbModels.manage();
     model.userid = ds.Tables[0].Rows[0]["f_yhzh"].ToString();
     model.id = ds.Tables[0].Rows[0]["f_id"].ToString();
     model.username = ds.Tables[0].Rows[0]["f_yhxm"].ToString();
     model.pwd = privateToDeDES(ds.Tables[0].Rows[0]["f_dlmm"].ToString());
     model.freeze = Convert.ToInt32(ds.Tables[0].Rows[0]["f_sfdj"]);
     return model;
 }
Beispiel #4
0
 /// <summary>根据userid得到管理员工信息</summary>
 public DbModels.manage getShop(XXF.Db.DbConn PubConn, string userid)
 {
     string sql = "SELECT  f_shzh,f_shsj,f_shmc,f_dlmm,f_sfdj FROM [tb_shop] where f_shzh=@userid or f_shsj=@userid";
     DataSet ds = new DataSet();
     XXF.Db.SimpleProcedureParameter para = new XXF.Db.SimpleProcedureParameter();
     para.Add("@userid", userid);
     PubConn.SqlToDataSet(ds, sql, para.ToParameters());
     if (ds.Tables[0].Rows.Count != 1)
         return null;
     DbModels.manage model = new DbModels.manage();
     model.userid = ds.Tables[0].Rows[0]["f_shzh"].ToString();
     model.id = model.userid;
     model.username = ds.Tables[0].Rows[0]["f_shmc"].ToString();
     model.pwd = privateToDeDES(ds.Tables[0].Rows[0]["f_dlmm"].ToString());
     model.freeze = Convert.ToInt32(ds.Tables[0].Rows[0]["f_sfdj"]);
     return model;
 }
Beispiel #5
0
        /// <summary></summary>
        public DbModels.manage getUser(XXF.Db.DbConn PubConn, string userid)
        {
            string  sql = "select f_id, f_yhzh,f_yhxm,f_dlmm,f_sfdj from tb_customer where f_yhzh=@userid";
            DataSet ds  = new DataSet();

            XXF.Db.SimpleProcedureParameter para = new XXF.Db.SimpleProcedureParameter();
            para.Add("@userid", userid);
            PubConn.SqlToDataSet(ds, sql, para.ToParameters());
            if (ds.Tables[0].Rows.Count != 1)
            {
                return(null);
            }
            DbModels.manage model = new DbModels.manage();
            model.userid   = ds.Tables[0].Rows[0]["f_yhzh"].ToString();
            model.id       = ds.Tables[0].Rows[0]["f_id"].ToString();
            model.username = ds.Tables[0].Rows[0]["f_yhxm"].ToString();
            model.pwd      = privateToDeDES(ds.Tables[0].Rows[0]["f_dlmm"].ToString());
            model.freeze   = Convert.ToInt32(ds.Tables[0].Rows[0]["f_sfdj"]);
            return(model);
        }
Beispiel #6
0
        /// <summary>根据userid得到管理员工信息</summary>
        public DbModels.manage getShop(XXF.Db.DbConn PubConn, string userid)
        {
            string  sql = "SELECT  f_shzh,f_shsj,f_shmc,f_dlmm,f_sfdj FROM [tb_shop] where f_shzh=@userid or f_shsj=@userid";
            DataSet ds  = new DataSet();

            XXF.Db.SimpleProcedureParameter para = new XXF.Db.SimpleProcedureParameter();
            para.Add("@userid", userid);
            PubConn.SqlToDataSet(ds, sql, para.ToParameters());
            if (ds.Tables[0].Rows.Count != 1)
            {
                return(null);
            }
            DbModels.manage model = new DbModels.manage();
            model.userid   = ds.Tables[0].Rows[0]["f_shzh"].ToString();
            model.id       = model.userid;
            model.username = ds.Tables[0].Rows[0]["f_shmc"].ToString();
            model.pwd      = privateToDeDES(ds.Tables[0].Rows[0]["f_dlmm"].ToString());
            model.freeze   = Convert.ToInt32(ds.Tables[0].Rows[0]["f_sfdj"]);
            return(model);
        }