Пример #1
0
        public ActionResult Movement()
        {
            string TransType = "";

            if (Request.QueryString["UEId"] != null)
            {
                ViewBag.UEId = Convert.ToInt32(Request.QueryString["UEId"]);
            }

            if (Request.QueryString["UserId"] != null)
            {
                ViewBag.UserId = Request.QueryString["UserId"];
            }

            if (Request.QueryString["UETypeId"] != null)
            {
                ViewBag.UETypeId = Request.QueryString["UETypeId"];
            }


            if (Request.QueryString["UEsts"] != null)
            {
                TransType = Request.QueryString["UEsts"];
            }

            AD_DefinationBL db = new AD_DefinationBL();

            ViewBag.UEStatus = db.SelectedList("byDefinationType", "UE Status", "-Transaction Type-");

            foreach (var v in ViewBag.UEStatus)
            {
                if (v.Text == TransType)
                {
                    ViewBag.UEsts = v.Value;
                }
            }

            ViewBag.UETypes = db.SelectedList("byDefinationType", "UE Type", "-select-");

            AD_UserEquipmentsBL ueb = new AD_UserEquipmentsBL();

            ViewBag.Equipments = ueb.SelectedList("All", "", "-select-");

            Sec_UserBL ub = new Sec_UserBL();

            ViewBag.Users = ub.SelectedList("ByStatus", true.ToString(), "-Users-");

            ViewBag.IssueToUsers = ub.SelectedList("ByStatus", true.ToString(), "-Users-");

            return(View());
        }
Пример #2
0
        // GET: Market
        public ActionResult Configuration(int Id = 0)
        {
            ViewBag.CityId = Id;
            AD_DefinationBL db = new AD_DefinationBL();

            if (ViewBag.IsAdmin)
            {
                ViewBag.Cities = db.SelectedList("AllCities");
            }
            else
            {
                ViewBag.Cities = db.SelectedList("UserCities", Convert.ToString(ViewBag.UserId));
            }

            Sec_UserBL ubl = new Sec_UserBL();

            ViewBag.Users = ubl.SelectedList("All", null);

            ViewBag.MarketUsers = ubl.SelectedList("ByCityId", Id.ToString());

            ViewBag.NetworkModes = db.SelectedList("NetworkModes", null, "-Select NetworkMode-");


            UserClientsBL ucb = new UserClientsBL();

            ViewBag.UserClients = ucb.SelectedList("byUserId", Convert.ToString(ViewBag.UserId));
            ViewBag.Projects    = db.SelectedList("UserProjects", Convert.ToString(ViewBag.UserId));

            ViewBag.ReportTypes = db.SelectedList("ReportTypes", null, "-Report Types-");

            ViewBag.Scopes    = db.SelectedList("byDefinationType", "Scope");
            ViewBag.PlotTypes = db.SelectedList("RFPlotTypes");


            return(View());
        }
Пример #3
0
        public ActionResult SelectableList(string filter, string value)
        {
            if (filter == "DevicesUsers")
            {
                Sec_UserDevicesBL udb = new Sec_UserDevicesBL();
                var rec = udb.SelectedList("All", "");
                return(Json(rec, JsonRequestBehavior.AllowGet));
            }
            else if (filter == "All")
            {
                Sec_UserBL ub  = new Sec_UserBL();
                var        rec = ub.SelectedList("ByStatus", true.ToString());
                return(Json(rec, JsonRequestBehavior.AllowGet));
            }


            return(null);
        }
Пример #4
0
        public ActionResult PlanProject(string Filter, Int64 ProjectId = 0, Int64 RevisionId = 0, DateTime?FromDate = null, DateTime?ToDate = null, string LocationIds = null, string TaskIds = null, string SiteStatus = null, Int64 UserId = 0)
        {
            PM_ProjectBL          pal        = new PM_ProjectBL();
            AD_DefinationBL       dbl        = new AD_DefinationBL();
            Sec_UserBL            ud         = new Sec_UserBL();
            List <PM_ProjectSite> result     = pal.PM_PlanProject(Filter, ProjectId, RevisionId, FromDate, ToDate, LocationIds, TaskIds, SiteStatus, UserId);
            List <SelectedList>   listStatus = dbl.SelectedList("byDefinationType", "Project Status");

            ViewBag.StatusId = listStatus;

            List <SelectedList>        listUsers    = ud.SelectedList("ByProjectId", ProjectId.ToString());
            List <PM_CompanyHierarchy> lstCompUsers = ListCompanyUsers("ByProjectId", ProjectId.ToString());

            List <Client> listOfClient = lstCompUsers.GroupBy(xx => xx.ClientId).Select(x => new Client()
            {
                ClientId      = x.Key,
                ClientName    = lstCompUsers.Where(XVC => XVC.ClientId == x.Key).FirstOrDefault().ClientName,
                userRolesList = lstCompUsers.Where(xr => xr.ClientId == x.Key).GroupBy(zx => zx.RoleId).Select(urol => new UserRoles()
                {
                    RoleId   = urol.Key,
                    RoleName = lstCompUsers.FirstOrDefault(zzzz => zzzz.RoleId == urol.Key).RoleName,
                    userList = lstCompUsers.Where(zzzz1 => zzzz1.RoleId == urol.Key && zzzz1.ClientId == x.Key).Select(usr => new Users()
                    {
                        FirstName = usr.FirstName,
                        LastName  = usr.LastName,
                        UserId    = usr.UserId,
                        UserName  = usr.UserName
                    }).ToList()
                }).ToList()
            }).ToList();

            foreach (var item in result)
            {
                item.SelectedListStatus = listStatus;
                item.Clients            = listOfClient;
                //item.ActualEndDate = item.ActualStartDate!=null? Convert.ToDateTime(item.ActualStartDate).ToShortDateString():null;
            }
            return(PartialView("~/Areas/Project/Views/Task/_PlanProject.cshtml", result));
        }