/// <summary> /// 获取业务员所属业务区域 /// </summary> /// <param name="userId"></param> /// <returns></returns> public IList <ParamItemModel> GetSaleOwnAreaByUserId(int userId) { //Hashtable ht = new Hashtable(); //ht.Add("UserId", userId); //ht.Add("ParamCode", CMSCommon.Constants.SysParamType.SaleAreaCode); return(DefaultMapper.GetMapper().SelectList <ParamItemModel>("Sales.GetSaleOwnAreaByUserId", userId)); }
/// <summary> /// 通过用户ID得到一个对象实体. /// </summary> //public IList<SalesManageDepartModel> GetByUserId(int UserId) //{ // return null; // //return DBProvider.dbMapper.SelectList<SalesManageDepartModel>("Sales_ManageDepart.GetByUserId", UserId); //} /// <summary> /// 管理的用户 /// </summary> /// <param name="userId"></param> /// <param name="orgCode"></param> /// <returns></returns> public IList <UserModel> GetManageUserByUserId(int userId, string orgCode) { Hashtable ht = new Hashtable(); ht["UserId"] = userId; ht["OrgCode"] = orgCode; return(DefaultMapper.GetMapper().SelectList <UserModel>("Sales_ManageDepart.GetManageUserByUserId", ht)); }
/// <summary> /// 增加一条数据 /// </summary> public void AddManageDepart(int userId, int orgId, string orgCode) { Hashtable ht = new Hashtable(); //int orgId = DefaultMapper.GetMapper().SelectObject<UserManageDepartModel>("User_ManageDepart.GetMaxIdModel", "").OrgId + 1; ht.Add("OrgId", orgId); ht.Add("UserID", userId); //ht.Add("JobNo", jobNo); ht.Add("OrgCode", orgCode); DefaultMapper.GetMapper().Insert("User_ManageDepart.InsertManageDepart", ht); }
/// <summary> /// 更新一条数据. /// </summary> public void Update(CompanyModel model) { DefaultMapper.GetMapper().Update("Company_BaseInfo.Update", model); }
/// <summary> /// 获取所有的记录对象. /// </summary> public IList <CompanyModel> GetAll() { return(DefaultMapper.GetMapper().SelectList <CompanyModel>("Company_BaseInfo.GetAll")); }
/// <summary> /// 获得所有记录. /// </summary> public IList <OrgAppendModel> GetAll() { return(DefaultMapper.GetMapper().SelectList <OrgAppendModel>("Org_AppendInfo.GetAll")); }
public int isExist(int orgId) { return(DefaultMapper.GetMapper().SelectObject <int>("Org_AppendInfo.isExist", orgId)); }
/// <summary> /// 得到一个对象实体. /// </summary> public OrgAppendModel GetById(int orgId) { return(DefaultMapper.GetMapper().SelectObject <OrgAppendModel>("Org_AppendInfo.GetByID", orgId)); }
/// <summary> /// 删除一条数据. /// </summary> public void DeleteById(int orgId) { DefaultMapper.GetMapper().Delete("Org_AppendInfo.DeleteById", orgId); }
/// <summary> /// 更新一条数据. /// </summary> public void Update(OrgAppendModel model) { DefaultMapper.GetMapper().Update("Org_AppendInfo.Update", model); }
/// <summary> /// 增加一条数据. /// </summary> public void Add(OrgAppendModel model) { DefaultMapper.GetMapper().Insert("Org_AppendInfo.Insert", model); }
/// <summary> /// 删除一条数据 /// </summary> public void DeleteManageDepartByUserId(int UserId) { DefaultMapper.GetMapper().Delete("User_ManageDepart.DeleteManageDepartByUserId", UserId); }
/// <summary> /// 主管部门 /// </summary> /// <param name="userId"></param> /// <returns></returns> public IList <OrgModel> GetSaleManageDepartByUserId(int userId) { return(DefaultMapper.GetMapper().SelectList <OrgModel>("Organization.GetSaleManageDepartByUserId", userId)); }