Ejemplo n.º 1
0
        /// <summary>
        /// 获取全部的用户
        /// </summary>
        /// <returns></returns>
        public List <User_Table> GetUserTableAll()
        {
            List <User_Table> list = new List <User_Table>();
            SqlDataReader     dr   = DBHerlper.ExecuteReader(GetSqlString("Select"),
                                                             CommandType.StoredProcedure);

            while (dr.Read())
            {
                User_Table obj = new User_Table()
                {
                    U_PhoneVerify       = dr["U_PhoneVerify"].ToString(),
                    IDT_id              = Convert.ToInt32(dr["IDT_id"]),
                    U_ComPanyAddress    = dr["U_ComPanyAddress"].ToString(),
                    U_Company           = dr["U_Company"].ToString(),
                    M_id                = Convert.ToInt32(dr["M_id"]),
                    U_CreateUserDate    = dr["U_CreateUserDate"].ToString(),
                    U_Head              = dr["U_Head"].ToString(),
                    U_id                = Convert.ToInt32(dr["U_id"]),
                    U_IDS               = dr["U_IDS"].ToString(),
                    U_LastLoginAddress  = dr["U_LastLoginAddress"].ToString(),
                    U_LastLoginDatetime = dr["U_LastLoginDatetime"].ToString(),
                    U_LoginAddress      = dr["U_LoginAddress"].ToString(),
                    U_LoginDatetime     = dr["U_LoginDatetime"].ToString(),
                    U_Sex               = dr["U_Sex"].ToString(),
                    U_Name              = dr["U_Name"].ToString(),
                    U_Phone             = dr["U_Phone"].ToString(),
                    U_UserName          = dr["U_UserName"].ToString(),
                    U_UserPwd           = dr["U_UserPwd"].ToString(),
                    LS_id               = Convert.ToInt32(dr["LS_id"])
                };
                list.Add(obj);
            }
            dr.Close();
            return(list);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取全部的产品试用申请
        /// </summary>
        /// <returns></returns>
        public List <ProductTryOur_Table> GetProductTryOurTableAll()
        {
            List <ProductTryOur_Table> list = new List <ProductTryOur_Table>();
            SqlDataReader dr = DBHerlper.ExecuteReader(GetSqlString("Select"),
                                                       CommandType.StoredProcedure);

            while (dr.Read())
            {
                ProductTryOur_Table obj = new ProductTryOur_Table()
                {
                    E_id           = Convert.ToInt32(dr["E_id"]),
                    PTO_Activate   = Convert.ToInt32(dr["PTO_Activate"]),
                    PTO_ApplyFor   = Convert.ToDateTime(dr["PTO_ApplyFor"]),
                    PTO_AuditDate  = Convert.ToDateTime(dr["PTO_AuditDate"]),
                    PTO_ExpireDate = Convert.ToDateTime(dr["PTO_ExpireDate"]),
                    PTO_id         = Convert.ToInt32(dr["PTO_id"]),
                    TO_id          = Convert.ToInt32(dr["TO_id"]),
                    PTO_Remark     = dr["PTO_Remark"].ToString(),
                    PTO_Name       = dr["TO_id"].ToString(),
                    U_id           = Convert.ToInt32(dr["U_id"])
                };
                list.Add(obj);
            }
            dr.Close();
            return(list);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 根据条件查询用户信息
        /// </summary>
        /// <param name="con"></param>
        /// <param name="type">[id,name,phone]选其一(必填)</param>
        /// <returns></returns>
        public User_Table GetUserTableByConn(string con, string type)
        {
            string        sql = "";
            User_Table    obj = null;
            SqlDataReader dr  = null;

            switch (type.ToLower())
            {
            case "id":
                sql = "Select * from User_Table where U_id=@U_id";
                dr  = DBHerlper.ExecuteReader(
                    sql, CommandType.Text, new SqlParameter[] {
                    new SqlParameter("@U_id", con)
                });
                break;

            case "name":
                sql = "Select * from User_Table where U_UserName=@U_UserName";
                dr  = DBHerlper.ExecuteReader(
                    sql, CommandType.Text, new SqlParameter[] {
                    new SqlParameter("@U_UserName", con)
                });
                break;

            case "phone":
                sql = "Select * from User_Table where U_Phone=@U_Phone";
                dr  = DBHerlper.ExecuteReader(
                    sql, CommandType.Text, new SqlParameter[] {
                    new SqlParameter("@U_Phone", con)
                });
                break;
            }
            if (dr.Read())
            {
                obj = new User_Table()
                {
                    U_PhoneVerify       = dr["U_PhoneVerify"].ToString(),
                    IDT_id              = Convert.ToInt32(dr["IDT_id"]),
                    U_ComPanyAddress    = dr["U_ComPanyAddress"].ToString(),
                    U_Company           = dr["U_Company"].ToString(),
                    M_id                = Convert.ToInt32(dr["M_id"]),
                    U_CreateUserDate    = dr["U_CreateUserDate"].ToString(),
                    U_Head              = dr["U_Head"].ToString(),
                    U_id                = Convert.ToInt32(dr["U_id"]),
                    U_IDS               = dr["U_IDS"].ToString(),
                    U_LastLoginAddress  = dr["U_LastLoginAddress"].ToString(),
                    U_LastLoginDatetime = dr["U_LastLoginDatetime"].ToString(),
                    U_LoginAddress      = dr["U_LoginAddress"].ToString(),
                    U_LoginDatetime     = dr["U_LoginDatetime"].ToString(),
                    U_Sex               = dr["U_Sex"].ToString(),
                    U_Name              = dr["U_Name"].ToString(),
                    U_Phone             = dr["U_Phone"].ToString(),
                    U_UserName          = dr["U_UserName"].ToString(),
                    U_UserPwd           = dr["U_UserPwd"].ToString(),
                    LS_id               = Convert.ToInt32(dr["LS_id"])
                };
            }
            dr.Close();
            return(obj);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 根据ID查询购物车信息
        /// </summary>
        /// <param name="con"></param>
        /// <returns></returns>
        public Shop_Table GetShopTableByConn(string attrName, string con)
        {
            string        name = "@" + attrName;
            Shop_Table    obj  = null;
            SqlDataReader dr   = DBHerlper.ExecuteReader(
                "Select * from Shop_Table where " + attrName + "=" + name,
                CommandType.Text, new SqlParameter[] {
                new SqlParameter(name, con)
            });

            if (dr.Read())
            {
                obj = new Shop_Table()
                {
                    P_No        = dr["P_No"].ToString(),
                    Shop_Date   = dr["Shop_Date"].ToString(),
                    Shop_Id     = Convert.ToInt32(dr["Shop_Id"]),
                    Shop_Number = dr["Shop_Number"].ToString(),
                    Shop_User   = dr["Shop_User"].ToString()
                };
            }
            dr.Close();
            DBHerlper.CloseConn();
            return(obj);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 根据ID查询产品试用申请信息
        /// </summary>
        /// <param name="con"></param>
        /// <returns></returns>
        public ProductTryOur_Table GetProductTryOurTableByConn(string con)
        {
            ProductTryOur_Table obj = null;
            SqlDataReader       dr  = DBHerlper.ExecuteReader(
                "Select * from ProductTryOur_Table where PTO_id=@PTO_id",
                CommandType.Text, new SqlParameter[] {
                new SqlParameter("@PTO_id", con)
            });

            if (dr.Read())
            {
                obj = new ProductTryOur_Table()
                {
                    E_id           = Convert.ToInt32(dr["E_id"]),
                    PTO_Activate   = Convert.ToInt32(dr["PTO_Activate"]),
                    PTO_ApplyFor   = Convert.ToDateTime(dr["PTO_ApplyFor"]),
                    PTO_AuditDate  = Convert.ToDateTime(dr["PTO_AuditDate"]),
                    PTO_ExpireDate = Convert.ToDateTime(dr["PTO_ExpireDate"]),
                    PTO_id         = Convert.ToInt32(dr["PTO_id"]),
                    TO_id          = Convert.ToInt32(dr["TO_id"]),
                    PTO_Remark     = dr["PTO_Remark"].ToString(),
                    PTO_Name       = dr["TO_id"].ToString(),
                    U_id           = Convert.ToInt32(dr["U_id"])
                };
            }
            dr.Close();
            return(obj);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 获取全部的订单
        /// </summary>
        /// <returns></returns>
        public List <Order_Table> GetOrderTableAll()
        {
            List <Order_Table> list = new List <Order_Table>();
            SqlDataReader      dr   = DBHerlper.ExecuteReader(GetSqlString("Select"),
                                                              CommandType.StoredProcedure);

            while (dr.Read())
            {
                Order_Table obj = new Order_Table()
                {
                    O_id         = Convert.ToInt32(dr["O_id"]),
                    OState_id    = (int)dr["OState_id"],
                    O_DateTime   = (DateTime)dr["O_DateTime"],
                    E_id         = (int)dr["E_id"],
                    O_DealWay    = dr["O_DealWay"].ToString(),
                    O_LeaveWords = dr["O_LeaveWords"].ToString(),
                    O_Remark     = dr["O_Remark"].ToString(),
                    P_id         = (int)dr["P_id"],
                    U_id         = (int)dr["U_id"]
                };
                list.Add(obj);
            }
            dr.Close();
            return(list);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 根据条件查询订单信息
        /// </summary>
        /// <param name="con"></param>
        /// <returns></returns>
        public List <Order_Table> GetOrderTableByConn(string attr, string con)
        {
            List <Order_Table> list  = new List <Order_Table> ();
            string             attrs = "@" + attr;
            SqlDataReader      dr    = DBHerlper.ExecuteReader(
                "Select * from Order_Table where " + attr + "=" + attrs,
                CommandType.Text, new SqlParameter[] {
                new SqlParameter(attrs, con)
            });

            if (dr.Read())
            {
                Order_Table obj = new Order_Table()
                {
                    O_id         = Convert.ToInt32(dr["O_id"]),
                    OState_id    = (int)dr["OState_id"],
                    O_DateTime   = (DateTime)dr["O_DateTime"],
                    E_id         = (int)dr["E_id"],
                    O_DealWay    = dr["O_DealWay"].ToString(),
                    O_LeaveWords = dr["O_LeaveWords"].ToString(),
                    O_Remark     = dr["O_Remark"].ToString(),
                    P_id         = (int)dr["P_id"],
                    U_id         = (int)dr["U_id"]
                };
                list.Add(obj);
            }
            dr.Close();
            return(list);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 根据ID查询密保信息
        /// </summary>
        /// <param name="con"></param>
        /// <returns></returns>
        public IssueAnswer_Table GetIssueAnswerTableByConn(string con)
        {
            IssueAnswer_Table obj = null;
            SqlDataReader     dr  = DBHerlper.ExecuteReader(
                "Select * from IssueAnswer_Table where IA_id=@IA_id",
                CommandType.Text, new SqlParameter[] {
                new SqlParameter("@IA_id", con)
            });

            if (dr.Read())
            {
                obj = new IssueAnswer_Table()
                {
                    IA_Answer1 = dr["IA_Answer1"].ToString(),
                    IA_Answer2 = dr["IA_Answer2"].ToString(),
                    IA_Answer3 = dr["IA_Answer3"].ToString(),
                    IA_id      = Convert.ToInt32(dr["IA_id"]),
                    IA_Issue1  = dr["IA_Issue1"].ToString(),
                    IA_Issue2  = dr["IA_Issue2"].ToString(),
                    IA_Issue3  = dr["IA_Issue3"].ToString(),
                    U_UserName = dr["U_UserName"].ToString()
                };
            }
            dr.Close();
            return(obj);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 根据条件查询订单信息并且进行分页
        /// </summary>
        /// <param name="id">用户ID</param>
        /// <param name="pageNo">当前页(用户选中的页数)</param>
        /// <param name="pageSize">显示数据</param>
        /// <returns></returns>
        public List <Order_Table> GetOrderTableByConn_Page(int id, int pageNo, int pageSize)
        {
            List <Order_Table> list = new List <Order_Table>();
            SqlDataReader      dr   = DBHerlper.ExecuteReader(
                "proc_OrderPage",
                CommandType.Text, new SqlParameter[] {
                new SqlParameter("@U_id", id),
                new SqlParameter("@PageNo", pageNo),
                new SqlParameter("@PageSize", pageSize)
            });

            if (dr.Read())
            {
                Order_Table obj = new Order_Table()
                {
                    O_id         = Convert.ToInt32(dr["O_id"]),
                    OState_id    = (int)dr["OState_id"],
                    O_DateTime   = (DateTime)dr["O_DateTime"],
                    E_id         = (int)dr["E_id"],
                    O_DealWay    = dr["O_DealWay"].ToString(),
                    O_LeaveWords = dr["O_LeaveWords"].ToString(),
                    O_Remark     = dr["O_Remark"].ToString(),
                    P_id         = (int)dr["P_id"],
                    U_id         = (int)dr["U_id"]
                };
                list.Add(obj);
            }
            dr.Close();
            return(list);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 根据ID查询招聘职位信息
        /// </summary>
        /// <param name="con"></param>
        /// <returns></returns>
        public JoinUs_Table GetJoinUsTableByConn(string con)
        {
            JoinUs_Table  obj = null;
            SqlDataReader dr  = DBHerlper.ExecuteReader(
                "Select * from JoinUs_Table where JU_id=@JU_id",
                CommandType.Text, new SqlParameter[] {
                new SqlParameter("@JU_id", con)
            });

            if (dr.Read())
            {
                obj = new JoinUs_Table()
                {
                    JUP_id            = Convert.ToInt32(dr["JUP_id"]),
                    JU_id             = Convert.ToInt32(dr["JU_id"]),
                    JU_Name           = dr["JU_Name"].ToString(),
                    JU_Address        = dr["JU_Address"].ToString(),
                    JU_SubmitDateTime = Convert.ToDateTime(dr["JU_SubmitDateTime"]),
                    JU_Phone          = dr["JU_Phone"].ToString(),
                    JU_Sex            = dr["JU_Sex"].ToString()
                };
            }
            dr.Close();
            return(obj);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// 根据输入的属性名称查询产品信息
        /// </summary>
        /// <param name="con"></param>
        /// <returns></returns>
        public Product_Table GetProductTableByConn(string tyepAttrName, string con)
        {
            Product_Table obj      = null;
            string        attrName = "@" + tyepAttrName;
            SqlDataReader dr       = DBHerlper.ExecuteReader(
                "Select * from Product_Table where " + tyepAttrName + "=" + attrName,
                CommandType.Text, new SqlParameter[] {
                new SqlParameter(attrName, con)
            });

            if (dr.Read())
            {
                obj = new Product_Table()
                {
                    E_id         = Convert.ToInt32(dr["E_id"]),
                    HP_id        = Convert.ToInt32(dr["HP_id"]),
                    NP_id        = Convert.ToInt32(dr["NP_id"]),
                    PT_id        = Convert.ToInt32(dr["PT_id"]),
                    P_Company    = dr["P_Company"].ToString(),
                    P_Date       = Convert.ToDateTime(dr["P_Date"]),
                    P_id         = Convert.ToInt32(dr["P_id"]),
                    P_Name       = dr["P_Name"].ToString(),
                    P_No         = dr["P_No"].ToString(),
                    P_Price      = Convert.ToDouble(dr["P_Price"]),
                    P_CoverImage = dr["P_CoverImage"].ToString(),
                    P_Introduce  = dr["P_Introduce"].ToString()
                };
            }
            dr.Close();
            return(obj);
        }
Ejemplo n.º 12
0
        /// <summary>
        /// 获取全部的产品
        /// </summary>
        /// <returns></returns>
        public List <Product_Table> GetProductTableAll()
        {
            List <Product_Table> list = new List <Product_Table>();
            SqlDataReader        dr   = DBHerlper.ExecuteReader(GetSqlString("Select"),
                                                                CommandType.StoredProcedure);

            while (dr.Read())
            {
                Product_Table obj = new Product_Table()
                {
                    E_id         = Convert.ToInt32(dr["E_id"]),
                    HP_id        = Convert.ToInt32(dr["HP_id"]),
                    NP_id        = Convert.ToInt32(dr["NP_id"]),
                    PT_id        = Convert.ToInt32(dr["PT_id"]),
                    P_Company    = dr["P_Company"].ToString(),
                    P_Date       = Convert.ToDateTime(dr["P_Date"]),
                    P_id         = Convert.ToInt32(dr["P_id"]),
                    P_Name       = dr["P_Name"].ToString(),
                    P_No         = dr["P_No"].ToString(),
                    P_Price      = Convert.ToDouble(dr["P_Price"]),
                    P_CoverImage = dr["P_CoverImage"].ToString(),
                    P_Introduce  = dr["P_Introduce"].ToString()
                };
                list.Add(obj);
            }
            dr.Close();
            return(list);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// 获取全部的部门
        /// </summary>
        /// <returns></returns>
        public List <Department_Table> GetDepartmentTableAll()
        {
            List <Department_Table> list = new List <Department_Table>();
            SqlDataReader           dr   = DBHerlper.ExecuteReader(GetSqlString("Select"),
                                                                   CommandType.StoredProcedure);

            while (dr.Read())
            {
                Department_Table obj = new Department_Table();
                obj.Dep_id   = Convert.ToInt32(dr["Dep_id"].ToString());
                obj.Dep_Name = dr["Dep_Name"].ToString();
                list.Add(obj);
            }
            dr.Close();
            return(list);
        }
Ejemplo n.º 14
0
        /// <summary>
        /// 根据ID查询部门信息
        /// </summary>
        /// <param name="con"></param>
        /// <returns></returns>
        public Department_Table GetDepartmentTableByConn(string con)
        {
            Department_Table obj = new Department_Table();
            SqlDataReader    dr  = DBHerlper.ExecuteReader(
                "Select * from Department_Table where Dep_id=@Dep_id",
                CommandType.Text, new SqlParameter[] {
                new SqlParameter("@Dep_id", con)
            });

            if (dr.Read())
            {
                obj.Dep_id   = Convert.ToInt32(dr["Dep_id"].ToString());
                obj.Dep_Name = dr["Dep_Name"].ToString();
            }
            dr.Close();
            return(obj);
        }
Ejemplo n.º 15
0
        /// <summary>
        /// 获取全部的登录状态
        /// </summary>
        /// <returns></returns>
        public List <LoginState_Table> GetLoginStateTableAll()
        {
            List <LoginState_Table> list = new List <LoginState_Table>();
            SqlDataReader           dr   = DBHerlper.ExecuteReader(GetSqlString("Select"),
                                                                   CommandType.StoredProcedure);

            while (dr.Read())
            {
                LoginState_Table obj = new LoginState_Table()
                {
                    LS_id   = Convert.ToInt32(dr["LS_id"]),
                    LS_Name = dr["LS_Name"].ToString()
                };
                list.Add(obj);
            }
            dr.Close();
            return(list);
        }
Ejemplo n.º 16
0
        /// <summary>
        /// 获取全部的是否热门产品
        /// </summary>
        /// <returns></returns>
        public List <HotProduct_Table> GetHotProductTableAll()
        {
            List <HotProduct_Table> list = new List <HotProduct_Table>();
            SqlDataReader           dr   = DBHerlper.ExecuteReader(GetSqlString("Select"),
                                                                   CommandType.StoredProcedure);

            while (dr.Read())
            {
                HotProduct_Table obj = new HotProduct_Table()
                {
                    HP_Name = dr["HP_Name"].ToString(),
                    HP_id   = Convert.ToInt32(dr["HP_id"])
                };
                list.Add(obj);
            }
            dr.Close();
            return(list);
        }
Ejemplo n.º 17
0
        /// <summary>
        /// 获取全部的邮箱
        /// </summary>
        /// <returns></returns>
        public List <Mail_Table> GetMailTableAll()
        {
            List <Mail_Table> list = new List <Mail_Table>();
            SqlDataReader     dr   = DBHerlper.ExecuteReader(GetSqlString("Select"),
                                                             CommandType.StoredProcedure);

            while (dr.Read())
            {
                Mail_Table obj = new Mail_Table()
                {
                    M_id    = Convert.ToInt32(dr["M_id"]),
                    M_Mail  = dr["M_Mail"].ToString(),
                    M_YesNo = dr["M_YesNo"].ToString()
                };
                list.Add(obj);
            }
            dr.Close();
            return(list);
        }
Ejemplo n.º 18
0
        /// <summary>
        /// 获取全部的招聘职位
        /// </summary>
        /// <returns></returns>
        public List <JoinUsPost_Table> GetJoinUsPostTableAll()
        {
            List <JoinUsPost_Table> list = new List <JoinUsPost_Table>();
            SqlDataReader           dr   = DBHerlper.ExecuteReader(GetSqlString("Select"),
                                                                   CommandType.StoredProcedure);

            while (dr.Read())
            {
                JoinUsPost_Table obj = new JoinUsPost_Table()
                {
                    JUP_id     = (int)dr["JUP_id"],
                    JUP_Name   = dr["JUP_Name"].ToString(),
                    JUP_Number = (int)dr["JUP_Number"]
                };
                list.Add(obj);
            }
            dr.Close();
            return(list);
        }
Ejemplo n.º 19
0
        /// <summary>
        /// 获取全部的证件类型
        /// </summary>
        /// <returns></returns>
        public List <IDType_Table> GetIDTypeTableAll()
        {
            List <IDType_Table> list = new List <IDType_Table>();
            SqlDataReader       dr   = DBHerlper.ExecuteReader(GetSqlString("Select"),
                                                               CommandType.StoredProcedure);

            while (dr.Read())
            {
                IDType_Table obj = new IDType_Table()
                {
                    IDT_Name = dr["IDT_Name"].ToString(),
                    IDT_id   = Convert.ToInt32(dr["IDT_id"])
                };
                list.Add(obj);
            }
            dr.Close();
            DBHerlper.CloseConn();
            return(list);
        }
Ejemplo n.º 20
0
        /// <summary>
        /// 根据ID查询职位信息
        /// </summary>
        /// <param name="con"></param>
        /// <returns></returns>
        public Post_Table GetPostTableByConn(string con)
        {
            Post_Table    obj = null;
            SqlDataReader dr  = DBHerlper.ExecuteReader(
                "Select * from Post_Table where Post_id=@Post_id",
                CommandType.Text, new SqlParameter[] {
                new SqlParameter("@Post_id", con)
            });

            if (dr.Read())
            {
                obj = new Post_Table()
                {
                    Post_id   = Convert.ToInt32(dr["Post_id"]),
                    Post_Name = dr["Post_Name"].ToString()
                };
            }
            dr.Close();
            return(obj);
        }
Ejemplo n.º 21
0
        /// <summary>
        /// 根据ID查询登录状态信息
        /// </summary>
        /// <param name="con"></param>
        /// <returns></returns>
        public LoginState_Table GetLoginStateTableByConn(string con)
        {
            LoginState_Table obj = null;
            SqlDataReader    dr  = DBHerlper.ExecuteReader(
                "Select * from LoginState_Table where LS_id=@LS_id",
                CommandType.Text, new SqlParameter[] {
                new SqlParameter("@LS_id", con)
            });

            if (dr.Read())
            {
                obj = new LoginState_Table()
                {
                    LS_id   = Convert.ToInt32(dr["LS_id"]),
                    LS_Name = dr["LS_Name"].ToString()
                };
            }
            dr.Close();
            return(obj);
        }
Ejemplo n.º 22
0
        /// <summary>
        /// 根据ID查询是否热门产品信息
        /// </summary>
        /// <param name="con"></param>
        /// <returns></returns>
        public HotProduct_Table GetHotProductTableByConn(string con)
        {
            HotProduct_Table obj = null;
            SqlDataReader    dr  = DBHerlper.ExecuteReader(
                "Select * from HotProduct_Table where HP_id=@HP_id",
                CommandType.Text, new SqlParameter[] {
                new SqlParameter("@HP_id", con)
            });

            if (dr.Read())
            {
                obj = new HotProduct_Table()
                {
                    HP_Name = dr["HP_Name"].ToString(),
                    HP_id   = Convert.ToInt32(dr["HP_id"])
                };
            }
            dr.Close();
            return(obj);
        }
Ejemplo n.º 23
0
        /// <summary>
        /// 根据ID查询招聘职位信息
        /// </summary>
        /// <param name="con"></param>
        /// <returns></returns>
        public JoinUsPost_Table GetJoinUsPostTableByConn(string con)
        {
            JoinUsPost_Table obj = null;
            SqlDataReader    dr  = DBHerlper.ExecuteReader(
                "Select * from JoinUsPost_Table where JUP_id=@JUP_id",
                CommandType.Text, new SqlParameter[] {
                new SqlParameter("@JUP_id", con)
            });

            if (dr.Read())
            {
                obj = new JoinUsPost_Table()
                {
                    JUP_id     = (int)dr["JUP_id"],
                    JUP_Name   = dr["JUP_Name"].ToString(),
                    JUP_Number = (int)dr["JUP_Number"]
                };
            }
            dr.Close();
            return(obj);
        }
Ejemplo n.º 24
0
        /// <summary>
        /// 根据ID查询邮箱信息
        /// </summary>
        /// <param name="con"></param>
        /// <returns></returns>
        public Mail_Table GetMailTableByConn(string con)
        {
            Mail_Table    obj = null;
            SqlDataReader dr  = DBHerlper.ExecuteReader(
                "Select * from Mail_Table where M_id=@M_id",
                CommandType.Text, new SqlParameter[] {
                new SqlParameter("@M_id", con)
            });

            if (dr.Read())
            {
                obj = new Mail_Table()
                {
                    M_id    = Convert.ToInt32(dr["M_id"]),
                    M_Mail  = dr["M_Mail"].ToString(),
                    M_YesNo = dr["M_YesNo"].ToString()
                };
            }
            dr.Close();
            return(obj);
        }
Ejemplo n.º 25
0
        /// <summary>
        /// 获取全部的解决方案
        /// </summary>
        /// <returns></returns>
        public List <Solution_Table> GetSolutionTableAll()
        {
            List <Solution_Table> list = new List <Solution_Table>();
            SqlDataReader         dr   = DBHerlper.ExecuteReader(GetSqlString("Select"),
                                                                 CommandType.StoredProcedure);

            while (dr.Read())
            {
                Solution_Table obj = new Solution_Table()
                {
                    P_id       = Convert.ToInt32(dr["P_id"]),
                    S_Content  = dr["S_Content"].ToString(),
                    S_Datetime = Convert.ToDateTime(dr["S_Datetime"]),
                    S_id       = Convert.ToInt32(dr["S_id"]),
                    S_tatle    = dr["S_tatle"].ToString()
                };
                list.Add(obj);
            }
            dr.Close();
            return(list);
        }
Ejemplo n.º 26
0
        /// <summary>
        /// 获取全部的新闻
        /// </summary>
        /// <returns></returns>
        public List <News_Table> GetNewsTableAll()
        {
            List <News_Table> list = new List <News_Table>();
            SqlDataReader     dr   = DBHerlper.ExecuteReader(GetSqlString("Select"),
                                                             CommandType.StoredProcedure);

            while (dr.Read())
            {
                News_Table obj = new News_Table()
                {
                    News_id      = Convert.ToInt32(dr["News_id"]),
                    News_Content = dr["News_Content"].ToString(),
                    News_Date    = dr["News_Date"].ToString(),
                    News_Anthor  = dr["News_Anthor"].ToString(),
                    News_Name    = dr["News_Name"].ToString()
                };
                list.Add(obj);
            }
            dr.Close();
            return(list);
        }
Ejemplo n.º 27
0
        /// <summary>
        /// 根据ID查询证件类型信息
        /// </summary>
        /// <param name="con"></param>
        /// <returns></returns>
        public IDType_Table GetIDTypeTableByConn(string con)
        {
            IDType_Table  obj = null;
            SqlDataReader dr  = DBHerlper.ExecuteReader(
                "Select * from IDType_Table where IDT_id=@IDT_id",
                CommandType.Text, new SqlParameter[] {
                new SqlParameter("@IDT_id", con)
            });

            if (dr.Read())
            {
                obj = new IDType_Table()
                {
                    IDT_Name = dr["IDT_Name"].ToString(),
                    IDT_id   = Convert.ToInt32(dr["IDT_id"])
                };
            }
            dr.Close();
            DBHerlper.CloseConn();
            return(obj);
        }
Ejemplo n.º 28
0
        /// <summary>
        /// 获取全部的评价
        /// </summary>
        /// <returns></returns>
        public List <Evaluate_Table> GetEvaluateTableAll()
        {
            List <Evaluate_Table> list = new List <Evaluate_Table>();
            SqlDataReader         dr   = DBHerlper.ExecuteReader(GetSqlString("Select"),
                                                                 CommandType.StoredProcedure);

            while (dr.Read())
            {
                Evaluate_Table obj = new Evaluate_Table()
                {
                    Eva_Content  = dr["Eva_Content"].ToString(),
                    Eva_Datetime = Convert.ToDateTime(dr["Eva_Datetime"]),
                    Eva_id       = Convert.ToInt32(dr["Eva_id"]),
                    P_id         = Convert.ToInt32(dr["P_id"]),
                    U_id         = Convert.ToInt32(dr["U_id"])
                };
                list.Add(obj);
            }
            dr.Close();
            return(list);
        }
Ejemplo n.º 29
0
        /// <summary>
        /// 根据ID查询员工信息
        /// </summary>
        /// <param name="con"></param>
        /// <returns></returns>
        public Employee_Table GetEmployeeTableByConn(string con)
        {
            Employee_Table obj = null;
            SqlDataReader  dr  = DBHerlper.ExecuteReader(
                "Select * from Employee_Table where E_id=@E_id",
                CommandType.Text, new SqlParameter[] {
                new SqlParameter("@E_id", con)
            });

            if (dr.Read())
            {
                obj = new Employee_Table()
                {
                    Dep_id             = Convert.ToInt32(dr["Dep_id"]),
                    E_Address          = dr["E_Address"].ToString(),
                    E_Date             = Convert.ToDateTime(dr["E_Date"]),
                    E_Education        = dr["E_Education"].ToString(),
                    E_id               = Convert.ToInt32(dr["E_id"]),
                    E_IdS              = dr["E_IdS"].ToString(),
                    E_LastLoginAddress = dr["E_LastLoginAddress"].ToString(),
                    E_LastLoginDate    = Convert.ToDateTime(dr["E_LastLoginDate"]),
                    E_LoginAddress     = dr["E_LoginAddress"].ToString(),
                    E_LoginDate        = Convert.ToDateTime(dr["E_LoginDate"]),
                    E_Name             = dr["E_Name"].ToString(),
                    E_Pay              = Convert.ToDouble(dr["E_Pay"]),
                    E_Phone            = dr["E_Phone"].ToString(),
                    E_School           = dr["E_School"].ToString(),
                    E_Sex              = dr["E_Sex"].ToString(),
                    E_UserName         = dr["E_UserName"].ToString(),
                    E_UserPwd          = dr["E_UserPwd"].ToString(),
                    IDT_id             = Convert.ToInt32(dr["IDT_id"]),
                    LS_ID              = Convert.ToInt32(dr["LS_ID"]),
                    Post_id            = Convert.ToInt32(dr["Post_id"])
                };
            }
            dr.Close();
            DBHerlper.CloseConn();
            return(obj);
        }
Ejemplo n.º 30
0
        /// <summary>
        /// 获取全部的购物车
        /// </summary>
        /// <returns></returns>
        public List <Shop_Table> GetShopTableAll()
        {
            List <Shop_Table> list = new List <Shop_Table>();
            SqlDataReader     dr   = DBHerlper.ExecuteReader(GetSqlString("Select"),
                                                             CommandType.StoredProcedure);

            while (dr.Read())
            {
                Shop_Table obj = new Shop_Table()
                {
                    P_No        = dr["P_No"].ToString(),
                    Shop_Date   = dr["Shop_Date"].ToString(),
                    Shop_Id     = Convert.ToInt32(dr["Shop_Id"]),
                    Shop_Number = dr["Shop_Number"].ToString(),
                    Shop_User   = dr["Shop_User"].ToString()
                };
                list.Add(obj);
            }
            dr.Close();
            DBHerlper.CloseConn();
            return(list);
        }