// GET: Organization public ActionResult Add() { OrganizationVM organizationVm = new OrganizationVM(); organizationVm.Organizations = _organizationManager.GetAll(); return(View(organizationVm)); }
public ActionResult Save() { List <Organization> organizations = manager.GetAll(); ViewBag.organizationList = organizations.ToList(); return(View()); }
// GET: Organizations/New public ActionResult New() { var branchVm = new BranchViewModel { Organizations = _organizationManager.GetAll() }; return(View("BranchForm", branchVm)); }
// GET: Employees/Create public ActionResult Create() { ViewBag.BranchId = new SelectList(_branchManager.GetAll(), "Id", "Name"); ViewBag.DepartmentId = new SelectList(_departmentManager.GetAll(), "Id", "Name"); ViewBag.DesignationId = new SelectList(_designationManager.GetAll(), "Id", "Name"); ViewBag.OrganizationId = new SelectList(_organizationManager.GetAll(), "Id", "Name"); return(View()); }
public ActionResult New() { var employeeVm = new EmployeeViewModel() { Organizations = _organizationManager.GetAll(), Branchs = new List <Branch>() }; return(View("EmployeeForm", employeeVm)); }
public ActionResult Save() { List <Organization> organizations = manager.GetAll(); ViewBag.organizationList = organizations.ToList(); List <OrganizationBranch> organizationBranches = orgBranchManager.OrganizationBranches(); ViewBag.OrgBranchList = organizationBranches; return(View()); }
public ActionResult New() { var assetLocationVm = new AssetLocationViewModel() { Organizations = _organizationManager.GetAll(), Branches = new List <Branch>() { } }; return(View("LocationForm", assetLocationVm)); }
public List <SelectListItem> GetOrganizationSelectitems() { var organization = organizationManager.GetAll(); var items = GetDefaultSelectListItem(); items.AddRange(organization.Select(o => new SelectListItem() { Value = o.Id.ToString(), Text = o.Name, })); return(items); }
public PartialViewResult GetOrganizationPartialCreate() { // List<Organization> organization = _organizationManager.GetAll(); // return PartialView("~/Views/Shared/Organization/_OrganizationPartialCreate.cshtml",organization); var model = new OrganizationCreateVM(); model.Organizations = _organizationManager.GetAll(); return(PartialView("~/Views/Shared/Organization/_OrganizationPartialCreate.cshtml", model)); }
public ActionResult Entry(int?id) { var organizations = organizationManager.GetAll(); ViewBag.Organizations = organizations; return(View()); }
public ActionResult Entry() { var organizations = _organization.GetAll(); ViewBag.Organizations = organizations; return(View()); }
public JsonResult GetByAjax() { var organizations = organizationManager.GetAll(); return(new JsonResult { Data = organizations, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
public List <SelectListItem> GetOrganizations() { return(_organizationManager.GetAll() .Select(c => new SelectListItem() { Value = c.Id.ToString(), Text = c.Name }).ToList()); }
public ActionResult New() { var assetEntryVm = new AssetEntryViewModel() { Organizations = _organizationManager.GetAll(), Branchs = new List <Branch>() { }, AssetLocations = new List <AssetLocation>() { }, AssetTypes = _assetTypeManager.GetAll(), AssetGroups = new List <AssetGroup>() { }, AssetManufacurers = new List <AssetManufacurer>() { }, AssetModels = new List <AssetModel>() { }, Statuses = new List <Status>() { new Status() { Id = true, Name = "Active" }, new Status() { Id = false, Name = "Inactive" } } }; return(View("AssetEntryForm", assetEntryVm)); }
public override void AfterCreateFull(IssueDtoEventArgs args) { if (!GeminiApp.Config.EmailAlertsEnabled) { return; } var data = args.Context.GlobalConfigurationWidgetStore.Get <List <CreateItemNotifierData> >(AppConstants.AppId); if (data == null || data.Value == null || data.Value.Count == 0) { return; } var projectData = data.Value.Find(d => d.ProjectId.GetValueOrDefault() == args.Issue.Entity.ProjectId); if (projectData == null) { projectData = data.Value.Find(d => d.ProjectId.GetValueOrDefault() == 0); } if (projectData == null) { return; } var alertService = GeminiApp.Container.Resolve <IAlertTemplates>(); var alerts = alertService.GetAll(); var template = alerts.Find(t => t.Id == projectData.TemplateId); if (template == null) { return; } AlertsTemplateHelper helper = new AlertsTemplateHelper(alerts, args.GeminiUrls[0].Key); using (var cache = GeminiApp.Container.Resolve <ICacheContainer>()) { var userManager = GeminiApp.GetManager <UserManager>(cache.Users.Find(u => u.Active && u.ProjectGroups.Where(p => p.ProjectGroupId == Constants.GlobalGroupAdministrators && p.UserId == u.Id).Any())); var metaManager = new MetaManager(userManager); var types = metaManager.TypeGetAll(); var OrganizationManager = new OrganizationManager(userManager); var organizations = OrganizationManager.GetAll(); var permissions = new PermissionSetManager(userManager); var permissionSets = permissions.GetAll(); PermissionsManager permissionManager = null; foreach (var user in projectData.UserIds) { var userDto = userManager.Get(user); if (userDto != null && userDto.Entity.Active) { if (permissionManager == null) { permissionManager = new PermissionsManager(userDto, types, permissionSets, organizations, userManager.UserContext.Config.HelpDeskModeGroup, false); } else { permissionManager = permissionManager.Copy(userDto); } if (!permissionManager.CanSeeItem(args.Issue.Project, args.Issue) || !userDto.Entity.EmailMe) { continue; } var body = helper.Build(template, args.Issue, userDto); string emailLog; EmailHelper.Send(GeminiApp.Config, body.Key.HasValue() ? body.Key : string.Format("[{0}] {1}", args.Issue.IssueKey, args.Issue.Title), body.Value, userDto.Entity.Email, userDto.Entity.Fullname, true, out emailLog); } } } }
// GET: Branches/Create public ActionResult Create() { ViewBag.OrganizationId = new SelectList(_organizationManager.GetAll(), "Id", "Name"); return(View()); }
// GET: Organizations public ActionResult Index() { var organizations = _organizationManager.GetAll(); return(View(organizations.ToList())); }
public ActionResult SearchOrganization() { var organizations = _organizationManager.GetAll(); return(View(organizations)); }
public JsonResult GetAssetDetailsWithAllNameById(int?assetId) { var result = from asset in assetManager.GetAll().Where(c => c.Id == assetId) join brand in brandManager.GetAll() on asset.BrandId equals brand.Id join category in categoryManager.GetAll() on brand.CategoryId equals category.Id join generalc in generalCategoryManager.GetAll() on category.GeneralCategoryId equals generalc.Id select new { assetid = asset.Id, assetname = asset.Name, assetcode = asset.Code, assetserialno = asset.SerialNo, assetprice = asset.Price, assetdescription = asset.Description, brandid = brand.Id, brandname = brand.Name, categoryid = category.Id, categoryname = category.Name, generalcategoryid = generalc.Id, generalcategoryname = generalc.Name, }; var result2 = from assetdetails in assetRegistrationDetailsManager.GetAll().Where(c => c.AssetId == assetId) join organization in organizationManager.GetAll() on assetdetails.OrganizationId equals organization.Id join branch in branchManager.GetAll() on assetdetails.BranchId equals branch.Id select new { organizationid = organization.Id, organizationname = organization.Name, branchid = branch.Id, branchname = branch.Name }; MovementEntryVM move = new MovementEntryVM(); foreach (var t in result) { move.AssetId = t.assetid; move.Code = t.assetcode; move.Price = t.assetprice; move.SerialNo = t.assetserialno; move.Description = t.assetdescription; move.BrandName = t.brandname; move.CategoryId = t.categoryid; move.CategoryNme = t.categoryname; move.GeneralCategoryId = t.generalcategoryid; move.GeneralCategoryName = t.generalcategoryname; } foreach (var t in result2) { move.OrganizationId = t.organizationid; move.OrganizationName = t.organizationname; move.BranchId = t.branchid; move.BranchName = t.branchname; } var jsonItem = new { Id = move.AssetId, Code = move.Code, Price = move.Price, SerialNo = move.SerialNo, Description = move.Description, BrandName = move.BrandName, CategoryName = move.CategoryNme, GeneralCategoryName = move.GeneralCategoryName, OrganizationId = move.OrganizationId, OrganizationName = move.OrganizationName, BranchId = move.BranchId, BranchName = move.BranchName }; return(Json(jsonItem, JsonRequestBehavior.AllowGet)); }
public ActionResult Index() { if (Session["username"] == null) { return(RedirectToAction("HomePage", "Home")); } var username = Session["username"].ToString(); int branchid = 0; var listo = userManager.GetAll().Where(c => c.UserName == username); foreach (var t in listo) { branchid = t.BranchId; } var result = from move in movementPermisionManager.GetAll().Where(c => c.Permision == false && c.BranchId == branchid) join asset in assetManager.GetAll() on move.AssetId equals asset.Id join org in organizationManager.GetAll() on move.OrganizationId equals org.Id join branch in branchManager.GetAll() on move.BranchId equals branch.Id select new { id = move.Id, date = move.RegistrationDate, asset = asset.Name, fromOrg = move.OrganizationName, frombranch = move.BranchName, toorg = org.Name, tobranch = branch.Name, moveby = move.MoveBy, permision = move.Permision }; var jsonitem = result.Select(c => new { c.id, c.date, c.asset, c.fromOrg, c.frombranch, c.toorg, c.tobranch, c.moveby, c.permision }); List <MovementAuthorityN> list = new List <MovementAuthorityN>(); foreach (var j in jsonitem) { MovementAuthorityN authorityN = new MovementAuthorityN(); authorityN.id = j.id; authorityN.date = j.date; authorityN.asset = j.asset; authorityN.fromOrg = j.fromOrg; authorityN.frombranch = j.frombranch; authorityN.toorg = j.toorg; authorityN.tobranch = j.tobranch; authorityN.moveby = j.moveby; authorityN.permision = j.permision; list.Add(authorityN); } ViewBag.list = list; return(View()); }
// Get All Organization public JsonResult GetAllOrganization() { var organizations = _organizationManager.GetAll(); return(Json(organizations, JsonRequestBehavior.AllowGet)); }