예제 #1
0
        private Model.Role SelectOperatorKeyTag(Model.Operators mOperators)
        {
            IList <Model.Role> roleList = this.roleManager.Select(mOperators.OperatorsId);

            if (roleList == null || roleList.Count == 0)
            {
                return(null);
            }
            Model.Role mRole = new Book.Model.Role();
            mRole.IsCOCount           = false;
            mRole.IsCOPrice           = false;
            mRole.IsEmployeeBasicInfo = false;
            mRole.IsProductCost       = false;
            mRole.IsSalaryViewCalc    = false;
            mRole.IsStockCount        = false;
            mRole.IsStockPrice        = false;
            mRole.IsXOPrice           = false;
            mRole.IsXOQuantity        = false;
            foreach (Model.Role item in roleList)
            {
                if (item.IsCOCount.HasValue && item.IsCOCount.Value)
                {
                    mRole.IsCOCount = true;
                }
                if (item.IsCOPrice.HasValue && item.IsCOPrice.Value)
                {
                    mRole.IsCOPrice = true;
                }
                if (item.IsEmployeeBasicInfo.HasValue && item.IsEmployeeBasicInfo.Value)
                {
                    mRole.IsEmployeeBasicInfo = true;
                }
                if (item.IsProductCost.HasValue && item.IsProductCost.Value)
                {
                    mRole.IsProductCost = true;
                }
                if (item.IsSalaryViewCalc.HasValue && item.IsSalaryViewCalc.Value)
                {
                    mRole.IsSalaryViewCalc = true;
                }
                if (item.IsStockCount.HasValue && item.IsStockCount.Value)
                {
                    mRole.IsStockCount = true;
                }
                if (item.IsStockPrice.HasValue && item.IsStockPrice.Value)
                {
                    mRole.IsStockPrice = true;
                }
                if (item.IsXOPrice.HasValue && item.IsXOPrice.Value)
                {
                    mRole.IsXOPrice = true;
                }
                if (item.IsXOQuantity.HasValue && item.IsXOQuantity.Value)
                {
                    mRole.IsXOQuantity = true;
                }
            }
            return(mRole);
        }
예제 #2
0
 public EditForm(Book.Model.Role role, string action)
     : this()
 {
     this.role   = role;
     this.action = action;
 }
예제 #3
0
 public IList <Book.Model.RoleOperation> Select(Book.Model.Role role)
 {
     return(sqlmapper.QueryForList <Model.RoleOperation>("RoleOperation.select_byRole", role.RoleId));
 }