public static void SetAntdUnitsInfo() { UnitRepo.SetInfo("C2BCCED9-42D1-4075-9036-3BD4A8C1355E", new string[] { "antd.service", "/usr/bin/mono /antd/Antd/start.antd.sh" }); }
public ActionResult Edit(UnitViewModel model) { if (ModelState.IsValid) { model.Update_By = User.Identity.Name; ResultResponse result = UnitRepo.Update(model); return(Json(new { success = result.Success, entity = model, message = result.Message }, JsonRequestBehavior.AllowGet)); } else { ResultResponse result = UnitRepo.Update(model); result.Success = false; result.Message = "Please fill data correctly!"; return(Json(new { success = result.Success, entity = model, message = result.Message }, JsonRequestBehavior.AllowGet)); } }
private void loadUnit() { UnitRepo unitrepo = new UnitRepo(); comboBoxUnit.DataSource = unitrepo.GetList(); comboBoxUnit.DisplayMember = "posunit"; comboBoxUnit.ValueMember = "id"; }
public static void SetAnthillaSPUnitsInfo() { UnitRepo.SetInfo("5A7D2098-0B99-44F3-AE52-DBA90666703A", new string[] { "anthillasp.service", "/usr/bin/mono /framework/Anthilla/AnthillaSP/AnthillaSP/AnthillaSP.exe" }); UnitRepo.SetInfo("A9A9F1C7-1885-4640-85D1-0D9195952621", new string[] { "anthillaserver.service", "/usr/bin/mono /framework/Anthilla/AnthillaSP/AnthillaServer/AnthillaServer.exe" }); }
public ActionResult DeleteConfirm(int id) { if (UnitRepo.Delete(id)) { return(Json(new { success = true }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { success = false }, JsonRequestBehavior.AllowGet)); } }
public ActionResult Edit(UnitViewModel model) { if (UnitRepo.Update(model)) { return(Json(new { success = true, entity = model }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { success = false }, JsonRequestBehavior.AllowGet)); } }
public ActionResult Create() { UserViewModel model = SouvenirRequestRepo.GetIdByName(User.Identity.Name); ViewBag.Souvenir = new SelectList(UnitRepo.Get(), "Id", "Name"); if (model.Role == "Staff" || model.Role == "Admin") { return(PartialView("_Create", new SouvenirViewModel())); } else { return(new RedirectToRouteResult(new RouteValueDictionary(new { controller = "AccessDenied", action = "Index" }))); } }
public static void SetAnthillaASUnitsInfo() { UnitRepo.SetInfo("0EC23814-92EA-4EB3-91D8-8B9BAECFD733", new string[] { "anthillaas.service", "/usr/bin/mono /framework/Anthilla/AnthillaAS/AnthillaAS/AnthillaAS.exe" }); UnitRepo.SetInfo("BE9BBA57-B551-43B5-965B-6F9E0DFE7CF5", new string[] { "anthillafirewall.service", "/usr/bin/mono /framework/Anthilla/AnthillaAS/AnthillaFirewall/AnthillaFirewall.exe" }); UnitRepo.SetInfo("613B8C07-1F7E-4048-8BB7-A5FC47E64D00", new string[] { "anthillastorage.service", "/usr/bin/mono /framework/Anthilla/AnthillaAS/AnthillaStorage/AnthillaStorage.exe" }); }
public ActionResult Edit(int id) { UserViewModel model2 = SouvenirRequestRepo.GetIdByName(User.Identity.Name); ViewBag.Unit = new SelectList(UnitRepo.Get(), "Id", "Name"); SouvenirViewModel model = SouvenirRepo.GetById(id); if (model2.Role == "Staff" || model2.Role == "Admin") { return(PartialView("_Edit", model)); } else { return(new RedirectToRouteResult(new RouteValueDictionary(new { controller = "AccessDenied", action = "Index" }))); } }
public ActionResult DeleteConfirm(int id) { bool result = UnitRepo.Delete(id); if (UnitRepo.Delete(id)) { return(Json(new { success = result, entity = "", message = "Delete Success" }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { success = result, entity = "", message = "Delete Failed" }, JsonRequestBehavior.AllowGet)); } }
public ActionResult Edit(int id) { UnitViewModel model = UnitRepo.GetById(id); return(PartialView("_Edit", model)); }
//[HttpPost] //public ActionResult Filter(UnitViewModel model) //{ // return PartialView("_List", UnitRepo.Filter(model)); //} public ActionResult List() { return(PartialView("_List", UnitRepo.Get())); }
// GET: Unit public ActionResult Index() { ViewBag.Unit1 = new SelectList(UnitRepo.Get(), "Code", "Code"); ViewBag.Unit2 = new SelectList(UnitRepo.Get(), "Name", "Name"); return(View(UnitRepo.Get())); }
public ActionResult Details(int id) { UnitViewModel model = UnitRepo.GetById(id); return(PartialView("_Details", model)); }