Exemple #1
0
 public BBaseManager(BUser user, Shop shop, Permission permission)
 {
     this.CurrentUser = user;
     GetUserById(user.ID);
     this.Shop = shop;
     this.GetShops();
     permissionManager = new PermissionManager(this.Shop.Shop_ID);
     this.CurrentUserPermission = permission;
     this.GetUserPermission();
 }
Exemple #2
0
 public BBaseManager(int user_id, int shop_id, Permission permission)
 {
     GetUserById(user_id);
     this.Shop_Id = shop_id;
     if (this.Shop_Id == 0)
     {
         this.GetShops();
     }
     permissionManager = new PermissionManager(shop_id);
     this.CurrentUserPermission = permission;
     this.GetUserPermission();
 }
Exemple #3
0
 public BBaseManager(BUser user, Permission permission)
 {
     GetUserById(user.ID);
     permissionManager = new PermissionManager();
     this.GetShops();
     this.CurrentUserPermission = permission;
     this.CurrentUser = user;
     this.GetUserPermission();
 }
Exemple #4
0
 public ReportFactory(BUser user, Shop shop, Permission permission)
     : base(user, shop, permission)
 {
 }
Exemple #5
0
 public UserManager(int user_id, Permission permission)
     : base(user_id,permission)
 {
 }
Exemple #6
0
 public ShopCategoryManager(BUser user, Shop shop, Permission permission)
     : base(user, shop, permission)
 {
     mallShopManager = new TaoBaoShopManager(this.AccessToken, this.Shop.Mall_Type_ID);
 }
Exemple #7
0
        public Permission GetAllPermission()
        {
            Permission p = new Permission();
            //shop owner has full permissions
            Type permission = typeof(Permission);
            FieldInfo[] fields = permission.GetFields();
            foreach (FieldInfo field in fields)
            {
                field.SetValue(p, 1);
            }

            return p;
        }
Exemple #8
0
 public SalesManager(BUser user, int shop_id, Permission permission)
     : base(user, shop_id, permission)
 {
     tradeManager = new TaobaoTradeManager(this.AccessToken, this.Shop.Mall_Type_ID);
 }
Exemple #9
0
 public BuyManager(BUser user, Shop shop, Permission permission)
     : base(user, shop, permission)
 {
 }
Exemple #10
0
 public BuyManager(BUser user, int shop_id, Permission permission)
     : base(user, shop_id,permission)
 {
 }
Exemple #11
0
 public SupplierManager(BUser user, Shop shop, Permission permission)
     : base(user, shop, permission)
 {
 }
Exemple #12
0
 public SupplierManager(BUser user, int shop_id, Permission permission)
     : base(user, shop_id, permission)
 {
 }
Exemple #13
0
 public ShopManager(BUser user, Shop shop, Permission permission)
     : base(user, shop, permission)
 {
     this.Mall_Type = shop.Mall_Type_ID;
     this.UserManager = new UserManager(user, permission); ;
 }
Exemple #14
0
 public ShopManager(BUser user, Shop shop, Permission permission,UserManager userMgr)
     : base(user, shop, permission)
 {
     this.Mall_Type=shop.Mall_Type_ID;
     this.UserManager=userMgr;
 }
Exemple #15
0
 public ShopManager(BUser user,int shop_id, int mall_type, Permission permission)
     : base(user, shop_id,permission)
 {
     this.Mall_Type = mall_type;
     UserManager = new UserManager(user,permission);
 }
Exemple #16
0
 public ProductManager(BUser user, int shop_id, Permission permission)
     : base(user,shop_id,permission)
 {
     stockManager = new StockManager(user,shop_id,permission);
 }
Exemple #17
0
 public BBaseManager(int user_id, Permission permission)
 {
     GetUserById(user_id);
     this.GetShops();
     permissionManager = new PermissionManager();
     this.CurrentUserPermission = permission;
     this.GetUserPermission();
 }
Exemple #18
0
 public ProductManager(BUser user, Shop shop, Permission permission)
     : base(user, shop, permission)
 {
     stockManager = new StockManager(user, shop, permission);
 }
Exemple #19
0
 public SalesManager(BUser user, Shop shop, Permission permission)
     : base(user, shop, permission)
 {
     stockManager = new StockManager(user, shop, permission);
     tradeManager = new TaobaoTradeManager(this.AccessToken, this.Shop.Mall_Type_ID);
 }
Exemple #20
0
 public PermissionManagement(BUser user, Shop shop, Permission permission)
     : base(user, shop, permission)
 {
     PermissionManager = new PermissionManager(shop.Shop_ID);
 }
Exemple #21
0
        /// <summary>
        /// Get user permission
        /// </summary>
        /// <param name="user">User object, must has User_ID field</param>
        /// <returns>Permissions Object</returns>
        public Permission GetUserPermission(BUser user)
        {
            Permission permissions = new Permission();
            List<Admin_Action> actions = this.GetUserActions(user);
            Type type = typeof(Permission);

            foreach (Admin_Action action in actions)
            {
                FieldInfo field = type.GetField(action.action_name);
                if (field != null)
                {
                    field.SetValue(permissions, 1);
                }
            }

            return permissions;
        }
Exemple #22
0
 public SupplierManager(BUser user, int shop_id, Permission permission)
     : base(user, shop_id,permission)
 {
 }
Exemple #23
0
 public UserManager(BUser user, Permission permission)
     : base(user,permission)
 {
 }
Exemple #24
0
 public SupplierManager(BUser user, Shop shop, Permission permission)
     : base(user, shop, permission)
 {
 }
Exemple #25
0
 public UserManager(int user_id, IOUserManager manager, Permission permission)
     : base(user_id,permission)
 {
     this.MallUserManager = manager;
 }
Exemple #26
0
 public ReportFactory(BUser user, Shop shop, Permission permission)
     : base(user, shop, permission)
 {
 }