Пример #1
0
        /// <summary>
        /// 新增动态
        /// </summary>
        /// <param name="dml"></param>
        /// <returns></returns>
        public bool InsertNew(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"insert into dbo.xs_new([new_title]
                          ,[new_content]
                          ,[create_time]
                          ,[create_user]
                          ,[update_user]
                          ,[update_time]
                          ,[new_type_id]
                          ,[new_sort])
                          values
                          (@new_title
                          ,@new_content
                          ,GETDATE()
                          ,@create_user
                          ,@create_user
                          ,getdate()
                          ,@new_type_id
                          ,@new_sort)";
            SqlHelper.Execute(sqlpara);
            return(true);
        }
Пример #2
0
        /// <summary>
        /// 查询商品类别
        /// </summary>
        /// <returns></returns>
        public DataTable QueryProductType()
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"select * from [dbo].[xs_product_type]";
            return(SqlHelper.GetDataTable(sqlpara));
        }
Пример #3
0
        /// <summary>
        /// 查询用户可以选择的群组
        /// </summary>
        /// <param name="dml"></param>
        /// <returns></returns>
        public DataTable QueryUserGroup()
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"select [group_id],[group_name] from [xs_group]  where group_id<>'G001'";
            return(SqlHelper.GetDataTable(sqlpara));
        }
Пример #4
0
        /// <summary>
        /// 查询类别和id
        /// </summary>
        /// <returns></returns>
        public DataTable QueryMainName()
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"select distinct [main_id], [main_name] from [xs_main]";
            return(SqlHelper.GetDataTable(sqlpara));
        }
Пример #5
0
        public DataTable QueryNewType()
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"select * from xs_new_type";
            return(SqlHelper.GetDataTable(sqlpara));
        }
Пример #6
0
        /// <summary>
        /// 查询招聘模板
        /// </summary>
        /// <returns></returns>
        public DataTable QueryHireTemplate()
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"select [hire_template_id],[hire_template_name],[hire_template_content]
                            from [dbo].[xs_hire_template]";
            return(SqlHelper.GetDataTable(sqlpara));
        }
Пример #7
0
        /// <summary>
        /// 判断用户存在
        /// </summary>
        /// <param name="dml"></param>
        /// <returns></returns>
        public bool ExistUser(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"select * from [dbo].[xs_users] where [user_no]=@userid";
            return(SqlHelper.Exist(sqlpara));
        }
Пример #8
0
        /// <summary>
        /// 是否存在群组名称
        /// </summary>
        /// <param name="dml"></param>
        /// <returns></returns>
        public bool ExistGroup(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"select * from  [dbo].[xs_group] where [group_id]<>@group_id and [group_name]=@group_name";
            return(SqlHelper.Exist(sqlpara));
        }
Пример #9
0
        /// <summary>
        /// 通过id查询所有信息
        /// </summary>
        /// <param name="dml"></param>
        /// <returns></returns>
        public DataTable QueryGroupByID(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"select * from  [dbo].[xs_group] where [group_id]=@group_id";
            return(SqlHelper.GetDataTable(sqlpara));
        }
Пример #10
0
        /// <summary>
        /// 删除产品类别
        /// </summary>
        /// <param name="dml"></param>
        /// <returns></returns>
        public bool DeleteProduct(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"delete from [dbo].[xs_product] where product_id=@product_id";
            SqlHelper.Execute(sqlpara);
            return(true);
        }
Пример #11
0
        /// <summary>
        /// 新增群组
        /// </summary>
        /// <returns></returns>
        public bool AddGroup(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"insert into [xs_group]([group_id],[group_name],[group_remark])values(@group_id,@group_name,@group_remark)";
            SqlHelper.Execute(sqlpara);
            return(true);
        }
Пример #12
0
        /// <summary>
        /// 更新群组
        /// </summary>
        /// <returns></returns>
        public bool UpdateGroup(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"update [xs_group] set [group_name]=@group_name,[group_remark]=@group_remark where [group_id]=@group_id";
            SqlHelper.Execute(sqlpara);
            return(true);
        }
Пример #13
0
        public DataTable QueryNewByID(string strID)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.AddSqlParameter("@new_id", strID);
            sqlpara.SQL = @"select new_title,new_content,create_user,create_time,new_type_id,new_sort from dbo.xs_new
                                where new_id=@new_id";
            return(SqlHelper.GetDataTable(sqlpara));
        }
Пример #14
0
        /// <summary>
        /// 招聘删除
        /// </summary>
        /// <returns></returns>
        public bool DeleteHire(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"delete from [xs_hire] where [hire_id]=@hire_id";
            SqlHelper.Execute(sqlpara);
            return(true);
        }
Пример #15
0
        /// <summary>
        /// 删除动态类别
        /// </summary>
        /// <param name="dml"></param>
        /// <returns></returns>
        public bool DeleteNewType(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"delete from  dbo.xs_new_type  where [new_type_id]=@new_type_id
                            delete from dbo.xs_new where [new_type_id]=@new_type_id";
            SqlHelper.Execute(sqlpara);
            return(true);
        }
Пример #16
0
        /// <summary>
        /// 新增招聘
        /// </summary>
        /// <returns></returns>
        public bool AddHire(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"insert into [dbo].[xs_hire]([hire_id],[hire_name],[hire_count],[hire_place],[hire_remark])
                            values (@hire_id ,@hire_name,@hire_count,@hire_place,@hire_remark)";
            SqlHelper.Execute(sqlpara);
            return(true);
        }
Пример #17
0
        /// <summary>
        /// 更新招聘模板
        /// </summary>
        /// <returns></returns>
        public bool UpdateHireTemplate(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"update [xs_hire_template] set [hire_template_name]=@hire_template_name,[hire_template_content]=@hire_template_content
                            where hire_template_id=@hire_template_id";
            SqlHelper.Execute(sqlpara);
            return(true);
        }
Пример #18
0
        /// <summary>
        /// 更新产品类别
        /// </summary>
        /// <param name="dml"></param>
        /// <returns></returns>
        public bool UpdateProductType(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"update xs_product_type set [product_type_name]=@producttype_name,[product_type_remark]=@producttype_remark
                            where [product_type_id]=@producttype_id";
            SqlHelper.Execute(sqlpara);
            return(true);
        }
Пример #19
0
        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="dml"></param>
        /// <returns></returns>
        public bool DeleteUser(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"delete from [xs_users]where [user_no]=@userid
                            delete from [xs_group_user] where  [user_no]=@userid";
            SqlHelper.Execute(sqlpara);
            return(true);
        }
Пример #20
0
        /// <summary>
        /// 更新用户
        /// </summary>
        /// <param name="dml"></param>
        /// <returns></returns>
        public bool UpdateUser(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"update [xs_users] set [user_name]=@userName where [user_no]=@userid
                            update [xs_group_user] set [group_id]=@usergroup where [user_no]=@userid";
            SqlHelper.Execute(sqlpara);
            return(true);
        }
Пример #21
0
        /// <summary>
        /// 更新招聘
        /// </summary>
        /// <returns></returns>
        public bool UpdateHire(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"update [xs_hire] set [hire_name]=@hire_name,[hire_count]=@hire_count,[hire_place]=@hire_place
                            ,[hire_remark]=@hire_remark where [hire_id]=@hire_id";
            SqlHelper.Execute(sqlpara);
            return(true);
        }
Пример #22
0
        /// <summary>
        /// 是否匹配账号密码
        /// </summary>
        /// <param name="dml"></param>
        /// <returns></returns>
        public DataTable QueryUser(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"select u.user_no,u.user_name,u.[user_password],gu.group_id,g.group_name from xs_users u
                            left join dbo.xs_group_user gu  on gu.user_no=u.user_no
                            left join dbo.xs_group g on g.group_id=gu.group_id where u.user_no=@user_no and u.user_password=@user_password";
            return(SqlHelper.GetDataTable(sqlpara));
        }
Пример #23
0
        /// <summary>
        /// 更新招聘
        /// </summary>
        /// <returns></returns>
        public bool UpdateMain(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"update [xs_main] set [main_content]=@main_content,updateuser=@updateuser
                            where [main_id]=@main_id ";
            SqlHelper.Execute(sqlpara);
            return(true);
        }
Пример #24
0
        /// <summary>
        /// 新增产品类别
        /// </summary>
        /// <param name="dml"></param>
        /// <returns></returns>
        public bool InsertProductType(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"insert into xs_product_type([product_type_id],[product_type_name],[product_type_remark])
                                values(@producttype_id,@producttype_name,@producttype_remark)";
            SqlHelper.Execute(sqlpara);
            return(true);
        }
Пример #25
0
        /// <summary>
        /// 新增招聘模板
        /// </summary>
        /// <returns></returns>
        public bool AddHireTemplate(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"insert into [xs_hire_template]([hire_template_name],[hire_template_content])
                            values(@hire_template_name,@hire_template_content)";
            SqlHelper.Execute(sqlpara);
            return(true);
        }
Пример #26
0
        /// <summary>
        /// 判断用户存在
        /// </summary>
        /// <param name="dml"></param>
        /// <returns></returns>
        public bool ChangeUserPassword(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"update dbo.xs_users
                            set user_password=@user_password
                            where user_no=@user_no";
            SqlHelper.Execute(sqlpara);
            return(true);
        }
Пример #27
0
        /// <summary>
        /// 新增用户
        /// </summary>
        /// <param name="dml"></param>
        /// <returns></returns>
        public bool AddUser(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"delete from [dbo].[xs_users] where [user_no]=@userid
                            insert into [xs_users]([user_no],[user_name],[user_password]) values(@userid,@userName,@userpassword)
                            delete from [dbo].[xs_group_user] where [user_no]=@userid
                            insert into [xs_group_user]([group_id],[user_no]) values(@usergroup,@userid)";
            SqlHelper.Execute(sqlpara);
            return(true);
        }
Пример #28
0
        /// <summary>
        /// 删除群组
        /// </summary>
        /// <returns></returns>
        public bool DeleteGroup(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"update [dbo].[xs_group_user] set [group_id]='G000' where [group_id]=@group_id
                            delete from [xs_group] where [group_id]=@group_id
                            delete from dbo.xs_group_user where [group_id]=@group_id
                            delete from dbo.xs_group_function  where [group_id]=@group_id   ";
            SqlHelper.Execute(sqlpara);
            return(true);
        }
Пример #29
0
        /// <summary>
        /// 加入产品
        /// </summary>
        /// <param name="dml"></param>
        /// <returns></returns>
        public bool InsertProduct(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"insert into xs_product(product_title,product_remark,product_content,product_imgurl,
                            product_type_id,product_create_time,[product_create_user],product_update_time,product_update_user)
                            values
                            (@product_title,@product_remark,@product_content,@product_imgurl,
                            @product_type_id,getdate(),@product_create_user,getdate(),@product_create_user)";
            SqlHelper.Execute(sqlpara);
            return(true);
        }
Пример #30
0
        /// <summary>
        /// 查询群组功能所有的数据源
        /// </summary>
        /// <param name="dml"></param>
        /// <param name="ICount"></param>
        /// <returns></returns>
        public DataSet QueryGroupFunction(DirModel dml)
        {
            xsSqlParameter sqlpara = new xsSqlParameter();

            sqlpara.AddSqlParameter(dml);
            sqlpara.SqlConnectString = GlabalString.DBString;
            sqlpara.SQL = @"select [function_id],[function_name],[function_level],[function_sort],[function_action],[function_parent_id] from [dbo].[xs_function]
                            where [function_inmenu]=1

                            select [action_id],[action_name] from [dbo].[xs_action]

                            select * from .[xs_group_function]   where [group_id]=@group_id";
            return(SqlHelper.GetDataSet(sqlpara));
        }