Exemplo n.º 1
0
        public ActionResult UsersGoldDistributionRatio(Dictionary <string, string> queryvalues)
        {
            int _Channels = queryvalues.ContainsKey("Channels") ? Convert.ToInt32(queryvalues["Channels"]) : 0;

            int MasterID = User.Identity.GetUserId <int>();

            if (AgentUserBLL.CheckUser(_Channels, MasterID))
            {
                _Channels = MasterID;
            }
            string       _UserList   = AgentUserBLL.GetUserListString(_Channels);
            string       _MasterList = AgentUserBLL.GetUserListString(MasterID);
            BaseDataView vbd         = new BaseDataView {
                UserList = _UserList, Channels = _Channels
            };

            ViewData["Channels"] = AgentUserBLL.GetUserList(_MasterList).Select(x => new SelectListItem {
                Text = x.AgentName, Value = x.Id.ToString(), Selected = x.Id == _Channels
            });

            BaseDataInfoForUsersGoldDistributionRatio model = BaseDataBLL.GetUsersGoldDistributionRatio(vbd);

            return(View(model));
        }