public JsonResult DeleteGroup(int id) { AD_DefinationBL db = new AD_DefinationBL(); var jsonReturn = db.Delete_Group("DeleteGroup", id); return(Json(jsonReturn, JsonRequestBehavior.AllowGet)); }
public ActionResult New() { AD_DefinationBL db = new AD_DefinationBL(); ViewBag.QuestionType = db.SelectedList("byDefinationType", "Question Type", "-Question Type-"); return(PartialView("~/Areas/Survey/Views/Question/_New.cshtml")); }
public ActionResult TranferLogs(Int64 SiteLayerId, Int64[] Sectors, string[] Tests, string[] Tasks, string SiteCode, int SiteId) { Response res = new Response(); try { TransferSiteLogsDL tsd = new TransferSiteLogsDL(); AV_SiteTestLogBL st = new AV_SiteTestLogBL(); var Sector = string.Join(",", Sectors); AD_DefinationBL db = new AD_DefinationBL(); ViewBag.Tests = db.SelectedList("byDefinationType", "Test Type", null); var Test = string.Join(",", Tests); var Task = string.Join(",", Tasks); st.TransferSiteLogs("Transfer_Testslogs", SiteId, SiteLayerId, Sector, Test, SiteCode, Task); foreach (var item in Tasks) { if (item == "Files") { st.ChangeFolderName(SiteLayerId, SiteCode); } } res.Status = "success"; res.Message = "save successfully"; } catch (Exception ex) { res.Status = "danger"; res.Message = ex.Message; } return(Json(res, JsonRequestBehavior.AllowGet)); }
public Response _LookupData(int _ProjectId) { Response _res = new Response(); PM_LookupData _lookup = new PM_LookupData(); try { PM_TaskEntryBL te = new PM_TaskEntryBL(); AD_DefinationBL db = new AD_DefinationBL(); _lookup.GroupResources = te.GET_Group_LIST("PopulateGroupResources").ToList(); _lookup.ProjectResources = te.GET_Group_LIST("PopulateUserResourcesProject", _ProjectId).Where(x => x.ResourceName != null && x.ResourceName != "").ToList(); _lookup.ProjectStatus = db.ToList("byDefinationType", "Project Task Status"); _lookup.Priorities = db.ToList("byDefinationType", "Priority"); Sec_UserBL ud = new Sec_UserBL(); _res.Message = "Ok"; _res.Status = "true"; _res.Value = _lookup; return(_res); } catch (Exception _ex) { _res.Message = _ex.Message; _res.Status = "false"; _res.Value = _lookup; return(_res); } }
public JsonResult GetGroup() { AD_DefinationBL db = new AD_DefinationBL(); var jsonReturn = db.List_Work_Group("GetGroup").ToList(); return(Json(jsonReturn, JsonRequestBehavior.AllowGet)); }
public ActionResult ReportFilters(Int64 ReportId) { AD_DefinationBL db = new AD_DefinationBL(); var rec = db.ToList("ReportFilters_byReportId", ReportId.ToString()); return(Json(rec, JsonRequestBehavior.AllowGet)); }
public JsonResult ToList(string filter, string value) { AD_DefinationBL db = new AD_DefinationBL(); var rec = db.ToList(filter, value); return(Json(rec, JsonRequestBehavior.AllowGet)); }
public ActionResult GetOptionIdsByBand(string band = "", string search = "", string start = "", string next = "") { AD_DefinationBL abc = new AD_DefinationBL(); var OptionIds = abc.ToList("byDefinationTypeOptionBand", band + "," + search + "," + start + "," + next); return(Json(OptionIds, JsonRequestBehavior.AllowGet)); }
// GET: TemplateSetting public ActionResult TestSetting() { SelectedList sl = new SelectedList(); UserClientsBL ucb = new UserClientsBL(); ViewBag.UserClients = ucb.SelectedList("byUserId", Convert.ToString(ViewBag.UserId)); AD_DefinationBL db = new AD_DefinationBL(); if (ViewBag.IsAdmin) { ViewBag.Cities = db.SelectedList("AllCities"); } else { ViewBag.Cities = db.SelectedList("UserCities", Convert.ToString(ViewBag.UserId)); } // ViewBag.Cities = sl.Cities(); ViewBag.NetworkModes = db.SelectedList("NetworkModes", null, "-Select NetworkMode-"); //ViewBag.NetworkModes = sl.NetworkModes(); ViewBag.Bands = db.ToList("Bands"); ViewBag.Carriers = db.ToList("Carriers"); return(View()); }
public ActionResult TranferLogs(Int64 Id) { SitesBL sb = new SitesBL(); List <BandVM> Bands = sb.GetSiteBands("", Id); ViewBag.Bands = Bands.Select(m => new { m.BandId, m.NetworkMode, m.LayerStatusId, m.BandName, m.Carrier, Text = m.NetworkMode + " " + m.BandName + " " + m.Carrier, Value = m.SiteCode + "_" + m.NetworkMode + "_" + m.BandName + "_" + m.Carrier }).ToList(); AV_SectorBL secb = new AV_SectorBL(); ViewBag.Sectors = secb.ToList("BySiteId", Id.ToString(), "0", "0", "0", "0").GroupBy(m => m.SectorCode).Select(grp => grp.First()).ToList(); AD_DefinationBL db = new AD_DefinationBL(); ViewBag.Tests = db.SelectedList("byDefinationType", "Test Type", null); AV_TestDL t = new AV_TestDL(); // ViewBag.count = t.CountTestsofsite("Count_Testslogs", Id, 0,"","","",""); ViewBag.count = null; ViewBag.Tasks = new List <SelectListItem>() { new SelectListItem { Value = "Summary", Text = "Summary" }, new SelectListItem { Value = "Logs", Text = "Logs" }, new SelectListItem { Value = "Files", Text = "Files" } }; ViewBag.SiteId = Id; return(View()); }
public ActionResult Inde2x() { AD_DefinationBL db = new AD_DefinationBL(); // var rec = db.ToList("ReportTree"); return(View(rec)); }
public ActionResult ModuleApps() { AD_DefinationBL pl = new AD_DefinationBL(); List <AD_Defination> apps = pl.ToList("byModuleApps", "0"); ViewBag.Apps = apps; return(PartialView("~/Views/Equipment/_ModuleApps.cshtml", apps)); }
public JsonResult CheckDeleteGroup(int id) { AD_DefinationBL db = new AD_DefinationBL(); var jsonReturn = db.List_Work_Group("CheckDelete", id).ToList(); //var jsonReturn = db.Delete_Group("CheckDelete", id); return(Json(jsonReturn, JsonRequestBehavior.AllowGet)); }
public ActionResult Edit(int Id = 0, int ProjectSiteId = 0) { if (Id > 0) { var oob = Permission.AllowProject(Convert.ToInt64(Id)); if (oob == null) { TempData["msg_error"] = "This Project is not assigned to you. Please contact administrator for project assignment."; return(RedirectToAction("index", "error", new { Area = "Project" })); } else { TempData["ProjectEntity"] = oob; TempData.Keep("ProjectEntity"); } } AD_DefinationBL db = new AD_DefinationBL(); Sec_UserSettingsDL udl = new Sec_UserSettingsDL(); ViewBag.FormType = (TempData["FormType"] != null) ? "Edit" : "New"; ViewBag.Id = Id; ViewBag.Bands = db.ToList("Bands"); ViewBag.ProjectSiteId = ProjectSiteId; ViewBag.ProjectSite = ub.ToList("Get_By_Id", ProjectSiteId.ToString()).FirstOrDefault(); if (ViewBag.ProjectSite == null) { TempData["msg_error"] = "Record Not Exist or You Are Not Authorize to access !"; return(RedirectToAction("All")); } ViewBag.Carriers = db.ToList("Carriers"); ViewBag.Regions = db.ToList("UserRegions", Convert.ToString(ViewBag.UserId)); DataTable Table = udl.GetDataTable("UserProjects", Convert.ToString(ViewBag.UserId), null, null); ViewBag.Projects = Table.ToList <PM_Projects>().Where(x => x.ProjectId == Id).ToList(); ViewBag.Cities = db.ToList("UserCities", Convert.ToString(ViewBag.UserId)); ViewBag.SubCheckList = db.ToList("byDefinationType", "Sub CheckList"); SWI.AirView.Common.SelectedList sl = new SWI.AirView.Common.SelectedList(); ViewBag.NetworkModes = db.SelectedList("NetworkModes", null, "-NetworkMode-"); var hjh = db.MultiSelecet("NetworkModes", null, "-NetworkMode-"); ViewBag.NetworkModesm = hjh; ViewBag.States = sl.Definations("UserStates", Convert.ToString(ViewBag.UserId), "-State-"); //sl.States(); TSS_SurveyDocumentBL sdb = new TSS_SurveyDocumentBL(); ViewBag.Surveys = sdb.ToList("GetAll_byIsActive", true.ToString());; ViewBag.Scopes = sl.Definations("UserScopes", Convert.ToString(ViewBag.UserId));// sl.Scopes(); ViewBag.Clients = sl.Clients("UserClients", Convert.ToString(ViewBag.UserId)); ViewBag.SiteTypes = sl.Definations("SiteTypes"); ViewBag.SiteClasses = sl.Definations("SiteClasses"); ViewBag.CheckList = sl.Definations("byDefinationType", "CheckList", "-CheckList-"); ViewBag.Sectors = sl.Sectors(); return(View()); }
// GET: Report public ActionResult Index1() { AD_DefinationBL db = new AD_DefinationBL(); ViewBag.Region = db.ToList("Regions").GroupBy(l => l.DefinationName) .Select(cl => new { Name = cl.First().DefinationName }).ToList(); return(View()); }
public ActionResult GetFilters(string Type) { try { AD_DefinationBL db = new AD_DefinationBL(); return(Json(db.ToList("byDefinationType", Type), JsonRequestBehavior.AllowGet)); } catch (Exception) { return(null); } }
public ActionResult Definations(string Filter) { try { AD_DefinationBL db = new AD_DefinationBL(); return(Json(db.ToList(Filter), JsonRequestBehavior.AllowGet)); } catch (Exception) { return(null); } }
public ActionResult GetColumn(string reportId) { try { AD_DefinationBL db = new AD_DefinationBL(); var result = db.ToColumnList("NET_LAYER_REPORT", reportId.ToString()); return(Json(result, JsonRequestBehavior.AllowGet)); } catch (Exception) { return(null); } }
public ActionResult GetDataTemplates(int id) { if (id != 0) { AD_DefinationBL db = new AD_DefinationBL(); var res = db.SelectedList("getDataTemplates", id.ToString()); return(Json(res, JsonRequestBehavior.AllowGet)); } else { return(Json("", JsonRequestBehavior.AllowGet)); } }
public ActionResult GetReportrecord(string reportFilter, string where, string select, string group) { try { AD_DefinationBL db = new AD_DefinationBL(); var result = db.ToDefinitionList(reportFilter, where, select, group); return(Json(result, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(null); } }
public ActionResult Edit(Int64 id) { AD_DefinationBL db = new AD_DefinationBL(); ViewBag.UETypes = db.SelectedList("byDefinationType", "UE Type", "-select Device-"); AD_UserEquipmentsBL ueb = new AD_UserEquipmentsBL(); ClientsBL cBl = new ClientsBL(); ViewBag.UEOwner = cBl.SelectedList("All", null, "-Select Owner-"); return(View("new", ueb.ToSingle("ById", id.ToString()))); }
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()); }
public ActionResult Scanner(int SiteId, int NetworkModeId, int BandId) { SelectedList sl = new SelectedList(); UserClientsBL ucb = new UserClientsBL(); ViewBag.UserClients = ucb.SelectedList("byUserId", Convert.ToString(ViewBag.UserId)); AD_DefinationBL db = new AD_DefinationBL(); if (ViewBag.IsAdmin) { ViewBag.Cities = db.SelectedList("AllCities"); } else { ViewBag.Cities = db.SelectedList("UserCities", Convert.ToString(ViewBag.UserId)); } ViewBag.Manufacturer = db.SelectedList("byDefinationType", "ScannerManufacturer", "-Select Manufacturer-"); ViewBag.ScannerModel = db.ToList("byDefinationType", "ScannerModel"); ViewBag.ScannerProtocol = db.SelectedList("byDefinationType", "Scanner Protocol", "-Select Protocol-"); ViewBag.ScannerBand = db.ToList("byDefinationType", "Scanner Band"); AV_SiteScannerConfigurationsBL site = new AV_SiteScannerConfigurationsBL(); var SiteData = site.ToList("GET_SiteParams", SiteId.ToString(), NetworkModeId.ToString(), BandId.ToString(), ""); if (SiteData != null && SiteData.Count > 0) { var Single = SiteData.FirstOrDefault(); if (Single != null) { ViewBag.ClientId = Single.ClientId; ViewBag.CityId = Single.CityId; } } ViewBag.SiteId = SiteId; ViewBag.NetworkModeId = NetworkModeId; ViewBag.BandId = BandId; //ViewBag.IsExist = false; //var siteConfig = site.ToList("GET_Configuration", SiteId.ToString(), NetworkModeId.ToString(), BandId.ToString()); //if (siteConfig.Count()>0) //{ // ViewBag.IsExist = true; // ViewBag.Values = siteConfig; // TempData["Templates"] = siteConfig; // ViewBag.TestCategory = siteConfig.GroupBy(test => test.TestCatogoryId) // .Select(grp => grp.First()) // .ToList(); // ViewBag.GetTestTypes = new Func<int, List<AV_GetScannerSettingTemplate>>(GetScannerTestTypes); // ViewBag.GetKpi = new Func<int, List<AV_GetScannerSettingTemplate>>(GetScannerKpi); //} return(View()); }
public List <Sec_Workgroup> GetGroupsList() { try { AD_DefinationBL dbl = new AD_DefinationBL(); return(dbl.List_Work_Group("GetGroup").Select(m => new Sec_Workgroup { WorkgroupName = m.WorkgroupName, WorkgroupId = Convert.ToInt32(m.WorkgroupId) }).ToList()); } catch (Exception) { throw; } }
public List <SelectListItem> WoStatus() { List <SelectListItem> items = new List <SelectListItem>(); AD_DefinationBL ucb = new AD_DefinationBL(); var lst = ucb.ToList("WO Status"); foreach (var item in lst) { items.Add(new SelectListItem { Text = item.DefinationName, Value = item.DefinationId.ToString() }); } return(items); }
public HttpResponseMessage UserLocations(string filter, string UserId) { AD_DefinationBL db = new AD_DefinationBL(); var result = db.ToList(filter, UserId); if (result != null) { return(Request.CreateResponse(HttpStatusCode.OK, result)); } else { return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "No Location(s) found")); } }
public JsonResult ScriptKPI(string value) { if (value != null) { AD_DefinationBL db = new AD_DefinationBL(); var rec = db.ToList("byDefinationType", value); //AD_DefinationBL db = new AD_DefinationBL(); //var rec = db.ToList("GetSettings", value).Where(m=>m.DefinationTypeId==15).ToList(); return(Json(rec, JsonRequestBehavior.AllowGet)); } return(null); }
public ActionResult New() { AD_DefinationBL db = new AD_DefinationBL(); ViewBag.UETypes = db.SelectedList("byDefinationType", "UE Type", "-Select Device-"); //TempData["CompanyId"] = Convert.ToString(ViewBag.CompId); //ViewBag.UEOwner = Convert.ToString(ViewBag.CompId); ClientsBL cBl = new ClientsBL(); ViewBag.UEOwner = cBl.SelectedList("All", null, "-Select Owner-"); return(View()); }
public ActionResult WoStatus(Int64 LayerId) { AV_NetLayerStatusBL nlsb = new AV_NetLayerStatusBL(); var rec = nlsb.ToSingle("Get_byLayerStatusId", 0, 0, 0, 0, LayerId.ToString()); if (rec != null) { AD_DefinationBL db = new AD_DefinationBL(); var Status = db.ToList("byDefinationType", "WO Status"); int Order = Status.Where(m => m.DefinationId == rec.Status).Select(m => m.SortOrder).FirstOrDefault(); ViewBag.Status = Status.Where(m => m.SortOrder < Order && m.SortOrder > 0).Select(m => new SWI.Libraries.Common.SelectedList { Value = m.DefinationId.ToString(), Text = m.DefinationName }).ToList(); } return(PartialView("~/views/NetLayerStatus/_WoStatus.cshtml", rec)); }
public ActionResult UniqueMarketSiteCodes() { Common.SelectedList sl = new Common.SelectedList(); AD_DefinationBL db = new AD_DefinationBL(); if (ViewBag.IsAdmin) { ViewBag.ddCities = db.SelectedList("AllCities"); } else { ViewBag.ddCities = db.SelectedList("UserCities", Convert.ToString(ViewBag.UserId)); } //ViewBag.ddCities = sl.Cities(true); return(PartialView("~/views/WorkOrder/_UniqueMarketSiteCodes.cshtml")); }