public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } clothes_dryer clothes_dryer = db.clothes_dryer.Find(id); if (clothes_dryer == null) { return(HttpNotFound()); } BreadCrumb.Clear(); BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add(Url.Action("AppliancesType", "Home"), "Save Energy"); BreadCrumb.Add(Url.Action("Index", "clothes_dryer"), "Clothes Dryer"); BreadCrumb.Add("", clothes_dryer.Model_No); // Smiliar products display logic var results = from x in db.clothes_dryer select x; var list = results.Where(x => x.Brand.Contains(clothes_dryer.Brand)).OrderBy(x => Guid.NewGuid()).Take(3).ToList(); ViewData["SimilarProducts"] = list; return(View(clothes_dryer)); }
// // GET: /Roles/Details/5 public async Task <ActionResult> Details(string id) { BreadCrumb.Add(Url.Action("Index"), "Regras/Detalhes"); if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var role = await _roleManager.FindByIdAsync(id); // Get the list of Users in this Role var users = new List <ApplicationUser>(); // Get the list of Users in this Role foreach (var user in _userManager.Users.ToList()) { if (await _userManager.IsInRoleAsync(user.Id, role.Name)) { users.Add(user); } } ViewBag.Users = users; ViewBag.UserCount = users.Count(); return(View(role)); }
public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } monitor monitor = db.monitors.Find(id); if (monitor == null) { return(HttpNotFound()); } BreadCrumb.Clear(); BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add(Url.Action("AppliancesType", "Home"), "Save Energy"); BreadCrumb.Add(Url.Action("Index", "monitors"), "Monitor"); BreadCrumb.Add("", monitor.Model_Number); // Smiliar products display logic var results = from x in db.monitors select x; var list = results.Where(x => x.Brand_Name.Contains(monitor.Brand_Name)).Take(3).ToList(); ViewData["SimilarProducts"] = list; return(View(monitor)); }
public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } television television = db.televisions.Find(id); if (television == null) { return(HttpNotFound()); } BreadCrumb.Clear(); BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add(Url.Action("AppliancesType", "Home"), "Save Energy"); BreadCrumb.Add(Url.Action("Index", "televisions"), "Television"); BreadCrumb.Add("", television.Model_No); // Smiliar products display logic var results = from x in db.televisions select x; var list = results.Where(x => x.Brand_Reg.Contains(television.Brand_Reg)).OrderBy(x => Guid.NewGuid()).Take(3).ToList(); ViewData["SimilarProducts"] = list; return(View(television)); }
// GET: Cidade public ActionResult Index() { BreadCrumb.Add(Url.Action("Index", "Culturas", "Cultura_Default"), "Cultura"); var culturaViewModel = _mapper.Map <IEnumerable <Dominio.Entidades.Cultura>, IEnumerable <CulturaIndexViewModel> >(_appService.BuscaTodos()); return(View(culturaViewModel)); }
//GET: Cidade public ActionResult Index() { var cidadeViewModel = _mapper.Map <IEnumerable <Dominio.Entidades.Cidade>, IEnumerable <CidadeIndexViewModel> >(_appService.BuscaTodos()); BreadCrumb.Add(Url.Action("Index", "Cidades", "Cidade_Default"), "Cidade"); return(View(cidadeViewModel)); }
public ActionResult Index(string kpilevelcode, string period, int?year, int?start, int?end) { BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add("/KPI/Index", "KPI"); if (period == "W") { BreadCrumb.SetLabel("Chart / Weekly"); } else if (period == "M") { BreadCrumb.SetLabel("Chart / Monthly"); } else if (period == "Q") { BreadCrumb.SetLabel("Chart / Quarterly"); } else if (period == "Y") { BreadCrumb.SetLabel("Chart / Yearly"); } var model = new DataChartDAO().ListDatas(kpilevelcode, period, year, start, end); ViewBag.Datasets = model.datasets; ViewBag.Labels = model.labels; ViewBag.Targets = model.targets; ViewBag.Standards = model.standards; ViewBag.Label = model.label; ViewBag.KPIName = model.kpiname; ViewBag.Period = model.period; ViewBag.KPILevelCode = model.kpilevelcode; ViewBag.StatusFavorite = model.statusfavorite == true ? "true" : "false"; ViewBag.Standard = model.Standard; ViewBag.Unit = model.Unit; ViewBag.Dataremarks = model.Dataremarks; if (model.period == "W") { ViewBag.PeriodText = "Weekly"; } ; if (model.period == "M") { ViewBag.PeriodText = "Monthly"; } ; if (model.period == "Q") { ViewBag.PeriodText = "Quarterly"; } ; if (model.period == "Y") { ViewBag.PeriodText = "Yearly"; } ; return(View()); }
// GET: Estado public ActionResult Index() { BreadCrumb.Add(Url.Action("Index", "UnidadeMedidas", "UnidadeMedida_Default"), "Unidade de Medida"); var unidadeViewModel = _mapper.Map <IEnumerable <Dominio.Entidades.UnidadeMedida>, IEnumerable <UnidadeMedidaIndexViewModel> >(_appService.BuscaTodos()); return(View(unidadeViewModel)); }
public async Task <ActionResult> Index(string kpilevelcode, int?catid, string period, int?year, int?start, int?end, string type = "", int?comID = 0, int?dataID = 0, string title = "") { BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.SetLabel("ChartPeriod"); if (period == "W") { BreadCrumb.SetLabel("Chart / Weekly"); } else if (period == "M") { BreadCrumb.SetLabel("Chart / Monthly"); } else if (period == "Q") { BreadCrumb.SetLabel("Chart / Quarterly"); } else if (period == "Y") { BreadCrumb.SetLabel("Chart / Yearly"); } var model = await new DataChartDAO().ListDatas(kpilevelcode, catid, period, year, start, end, (Session["UserProfile"] as UserProfileVM).User.ID); ViewBag.Model = model; return(View()); }
// GET: Estado public ActionResult Index() { var estadoViewModel = _mapper.Map <IEnumerable <Dominio.Entidades.Estado>, IEnumerable <EstadoIndexViewModel> >(_appService.BuscaTodos()); BreadCrumb.Add(Url.Action("Index", "Estados", "Estado_Default"), "Estado"); return(View(estadoViewModel)); }
protected void Page_Load(object sender, EventArgs e) { (Master as WikiMaster).GetNavigateActionsVisible += new WikiMaster.GetNavigateActionsVisibleHandle(PageHistoryList_GetNavigateActionsVisible); var page = Wiki.GetPage(PageNameUtil.Decode(WikiPage)); if (Request["page"] == null || page == null) { Response.RedirectLC("Default.aspx", this); } string PageName = page.PageName.Equals(string.Empty) ? WikiResource.MainWikiCaption : page.PageName; BreadCrumb.Add(new ASC.Web.Controls.BreadCrumb() { Caption = PageName, NavigationUrl = ActionHelper.GetViewPagePath(this.ResolveUrlLC("Default.aspx"), page.PageName) }); BreadCrumb.Add(new ASC.Web.Controls.BreadCrumb() { Caption = WikiResource.wikiHistoryCaption }); if (!IsPostBack) { cmdDiff.Text = WikiResource.cmdDiff; cmdDiff_Top.Text = WikiResource.cmdDiff; BindHistoryList(); } }
public async Task <ActionResult> Index(string kpilevelcode, int?catid, string period, int?year, int?start, int?end) { BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add("/KPI/Index", "KPI"); if (period == "W") { BreadCrumb.SetLabel("Chart / Weekly"); } else if (period == "M") { BreadCrumb.SetLabel("Chart / Monthly"); } else if (period == "Q") { BreadCrumb.SetLabel("Chart / Quarterly"); } else if (period == "Y") { BreadCrumb.SetLabel("Chart / Yearly"); } var model = await new DataChartDAO().ListDatas(kpilevelcode, catid, period, year, start, end); ViewBag.Model = model; return(View()); }
public ActionResult Index(string obj) { BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add("/KPI/Index", "KPI"); BreadCrumb.SetLabel("Compare"); var compare = new DataChartDAO().Compare(obj); if (compare.list1 == null) { compare.list1 = new Model.ViewModel.ChartVM(); } if (compare.list2 == null) { compare.list2 = new Model.ViewModel.ChartVM(); } if (compare.list3 == null) { compare.list3 = new Model.ViewModel.ChartVM(); } if (compare.list4 == null) { compare.list4 = new Model.ViewModel.ChartVM(); } ViewBag.List1 = compare.list1; ViewBag.List2 = compare.list2; ViewBag.List3 = compare.list3; ViewBag.List4 = compare.list4; return(View()); }
private Tuple <Course, Module, Activity> MakeBreadCrumbs(int?courseId, int?moduleId, int?activityId) { BreadCrumb.Clear(); BreadCrumb.Add("/", "Home"); // Fetch DB Activity, Module and Course var activity = db.Activities.Find(activityId); var module = db.Modules.Find(moduleId); var course = db.Courses.Find(courseId); // Create return object var ret = new Tuple <Course, Module, Activity>(course, module, activity); // Make sure we have a course, fall back on module.Course or activity.Module.Course if course is null course = course ?? module?.Course ?? activity?.Module?.Course; if (course != null) { BreadCrumb.Add(Url.Action("Index", "Modules", new { courseId = course.Id }), course.Name); // Make sure we have a module, fall back on activity.Module if module is null module = module ?? activity?.Module; if (module != null) { BreadCrumb.Add(Url.Action("Index", "Activities", new { moduleId = module.Id }), module.Name); if (activity != null) { BreadCrumb.Add(Url.Action("Index", "Activities", new { moduleId = activity.ModuleId }), activity.Name); } } } return(ret); }
public ActionResult AppliancesType() { BreadCrumb.Clear(); BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add("", "Save Energy"); return(View()); }
public ActionResult Composting() { BreadCrumb.Clear(); BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add("", "Composting"); return(View()); }
public ActionResult Index() { BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add("/KPI/Index", "KPI"); BreadCrumb.SetLabel("Period"); return(View()); }
public ActionResult PhotoGallery() { BreadCrumb.Clear(); BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add(Url.Action("PhotoGallery", "Home"), "Photo Gallery"); return(View("PhotoGallery", "_AdsLayout1")); }
public ActionResult MeetOurStaff() { BreadCrumb.Clear(); BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add(Url.Action("MeetOurStaff", "Home"), "Meet Our Staff"); return(View("MeetOurStaff", "_AdsLayout1")); }
public ActionResult MeettheDoctors() { BreadCrumb.Clear(); BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add(Url.Action("MeettheDoctors", "Home"), "Meet Dr. Tekle"); return(View("MeettheDoctors", "_AdsLayout1")); }
public ActionResult OurPhilosophy() { BreadCrumb.Clear(); BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add(Url.Action("OurPhilosophy", "Home"), "Our Philosophy"); return(View("OurPhilosophy", "_AdsLayout1")); }
// GET: recycling_centres public ActionResult Index() { BreadCrumb.Clear(); BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add("", "Recycling centre map"); return(View(db.recycling_centres.ToList())); }
public ActionResult LeftoverRecipe() { ViewBag.Message = "LeftoverRecipe"; BreadCrumb.Clear(); BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add(Url.Action("ReduceFoodWaste", "Home"), "Reduce Waste"); BreadCrumb.Add("", "Left-Over Food Recipes"); List <SelectListItem> Difficulty_level = new List <SelectListItem>(); Difficulty_level.Add(new SelectListItem() { Text = "All", Value = null }); Difficulty_level.Add(new SelectListItem() { Text = "Easy", Value = "easy" }); Difficulty_level.Add(new SelectListItem() { Text = "Average", Value = "average" }); Difficulty_level.Add(new SelectListItem() { Text = "Challenging", Value = "Challenging" }); this.ViewBag.Difficulty = new SelectList(Difficulty_level, "Value", "Text"); return(View()); }
private void UpdateBreadCrumb() { if (OldVer == 0 || NewVer == 0 || OldVer == NewVer) { Response.RedirectLC(ActionHelper.GetViewPagePath(this.ResolveUrlLC("PageHistoryList.aspx"), PageNameUtil.Decode(WikiPage)), this); } string pageName = PageNameUtil.Decode(WikiPage); if (string.IsNullOrEmpty(pageName)) { pageName = WikiResource.MainWikiCaption; } BreadCrumb.Clear(); BreadCrumb.Add(new ASC.Web.Controls.BreadCrumb() { Caption = pageName, NavigationUrl = ActionHelper.GetViewPagePath(this.ResolveUrlLC("Default.aspx"), PageNameUtil.Decode(WikiPage)) }); BreadCrumb.Add(new ASC.Web.Controls.BreadCrumb() { Caption = WikiResource.wikiHistoryCaption, NavigationUrl = ActionHelper.GetViewPagePath(this.ResolveUrlLC("PageHistoryList.aspx"), PageNameUtil.Decode(WikiPage)) }); BreadCrumb.Add(new ASC.Web.Controls.BreadCrumb() { Caption = string.Format(WikiResource.wikiDiffDescriptionFormat, OldVer, NewVer) }); }
public async Task <ActionResult> Index() { BreadCrumb.Add("/", "Home"); BreadCrumb.SetLabel("Dashboard"); //if (!await new NotificationDAO().IsSended()) //{ // //var model2 = new ActionPlanDAO().CheckLateOnUpdateData(); //var model = new ActionPlanDAO().CheckDeadline(); //string from = ConfigurationManager.AppSettings["FromEmailAddress"].ToSafetyString(); ////Late on upload data //string content2 = System.IO.File.ReadAllText(Server.MapPath("~/Templates/LateOnUpDateData.html")); //content2.Replace("{{{content}}}", "Your below KPIs have expired: "); ////Late on task //string content = System.IO.File.ReadAllText(Server.MapPath("~/Templates/LateOnUpDateData.html")); //content.Replace("{{{content}}}", "Your below KPIs have expired: "); //var html = string.Empty; //var count = 0; //foreach (var item2 in model2) //{ // count++; // html += @"<tr> // <td valign='top' style='padding:5px; font-family: Arial,sans-serif; font-size: 16px; line-height:20px;'>{{no}}</td> // <td valign='top' style='padding:5px; font-family: Arial,sans-serif; font-size: 16px; line-height:20px;'>{{kpiname}}</td> // <td valign='top' style='padding:5px; font-family: Arial,sans-serif; font-size: 16px; line-height:20px;'>{{year}}</td> // </tr>" // .Replace("{{no}}", count.ToString()) // .Replace("{{kpiname}}", item2[1]) // .Replace("{{year}}", item2[3]); // content2 = content2.Replace("{{{html-template}}}", html); // string to = item2[0].ToSafetyString(); // string subject = "Late on upload data"; // Commons.SendMail(from, to, subject, content2, "Late on upload data"); //} //foreach (var item in model) //{ // //string content = "Please note that the action plan we are overdue on " + item.Deadline; // count++; // html += @"<tr> // <td valign='top' style='padding:5px; font-family: Arial,sans-serif; font-size: 16px; line-height:20px;'>{{no}}</td> // <td valign='top' style='padding:5px; font-family: Arial,sans-serif; font-size: 16px; line-height:20px;'>{{kpiname}}</td> // <td valign='top' style='padding:5px; font-family: Arial,sans-serif; font-size: 16px; line-height:20px;'>{{year}}</td> // </tr>" // .Replace("{{no}}", count.ToString()) // .Replace("{{kpiname}}", item.Title); // content = content.Replace("{{{html-template}}}", html); // string to = item.Email.ToSafetyString(); // string subject = "Late on task"; // Commons.SendMail(from, to, subject, content, "Late on task "); //} //var itemSendMail = new StateSendMail(); //await new NotificationDAO().AddSendMail(itemSendMail); //} await SendMail(); return(View()); }
public ActionResult EnergyQuiz() { BreadCrumb.Clear(); BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add(Url.Action("Quiz", "Home"), "Household Assessment"); BreadCrumb.Add("", "Save Energy Assessment"); return(View()); }
public ActionResult ReduceWasteQuiz() { BreadCrumb.Clear(); BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add(Url.Action("Quiz", "Home"), "Household Assessment"); BreadCrumb.Add("", "Reduce Waste Assessment"); return(View()); }
public ActionResult About() { ViewBag.Message = "Description"; BreadCrumb.Clear(); BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add("", "Learn More"); return(View()); }
public ActionResult Quiz() { ViewBag.Message = "How much do you know about saving money and energy?"; BreadCrumb.Clear(); BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add("", "Household Assessment"); return(View()); }
public ActionResult ReduceFoodWaste() { ViewBag.Message = "Reduce waste"; BreadCrumb.Clear(); BreadCrumb.Add(Url.Action("Index", "Home"), "Home"); BreadCrumb.Add("", "Reduce Waste"); return(View()); }