Beispiel #1
0
        public ActionResult NumberOfRegisteredUsersDetail(Dictionary <string, string> queryvalues)
        {
            //oper
            string   oper            = queryvalues.ContainsKey("oper") ? queryvalues["oper"] : "";
            int      _page           = queryvalues.ContainsKey("page") ? Convert.ToInt32(queryvalues["page"]) : 1;
            int      _Channels       = queryvalues.ContainsKey("Channels") ? Convert.ToInt32(queryvalues["Channels"]) : 0;
            string   _StartDate      = queryvalues.ContainsKey("StartDate") ? queryvalues["StartDate"] : DateTime.Now.ToString("yyyy-MM-dd 00:00:00");
            var      arr             = _StartDate.Split('-');
            DateTime dts             = new DateTime(Convert.ToInt32(arr[0]), Convert.ToInt32(arr[1]), Convert.ToInt32(_StartDate.Substring(8, 2)), 0, 0, 0);
            DateTime dte             = dts.AddDays(1);
            string   _ExpirationDate = dts.AddDays(1).ToString("yyyy-MM-dd 00:00:00");


            groupby _Groupby = (groupby)(queryvalues.ContainsKey("groupby") ? Convert.ToInt32(queryvalues["groupby"]) : 1);



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

            if (AgentUserBLL.CheckUser(_Channels, MasterID))
            {
                _Channels = MasterID;
            }
            string _UserList = AgentUserBLL.GetUserListString(_Channels);



            BaseDataView vbd = new BaseDataView {
                UserList = _UserList, Channels = _Channels, StartDate = _StartDate, ExpirationDate = _ExpirationDate, Groupby = _Groupby, SearchExt = oper
            };

            vbd.BaseDataList = new List <BaseDataInfo>(BaseDataBLL.GetRegisteredUsersOnHour(vbd));
            //通过时间查询role列表
            BaseDataView vbd2 = new BaseDataView {
                UserList = _UserList, Channels = _Channels, StartDate = dts.ToString("yyyy-MM-dd 00:00:00"), ExpirationDate = dte.ToString("yyyy-MM-dd 00:00:00"), Groupby = _Groupby, SearchExt = oper
            };


            //通过渠道查询注册信息


            string target = queryvalues.ContainsKey("target") ? queryvalues["target"] : "";


            return(View(vbd));
        }