public ActionResult SocuvajPoraka(ViewPoraki vporaka, int[] selectedKlients) { var user = (LoggedInEntity)Session["LoggedInEntity"]; Poraki novaPoraka = new Poraki(); novaPoraka.Subject = vporaka.Subject; novaPoraka.Body = vporaka.Body; novaPoraka.Date = DateTime.Now; novaPoraka.IsSent = false; novaPoraka.IsDeleted = false; novaPoraka.IsReceived = false; novaPoraka.Klienti = _klienti.ListaNaKlientiSporedId(selectedKlients); if (user.UserType == Helpers.Enumerations.LogedUserTypeEnum.Poedinec) novaPoraka.IdPoedinci = user.Id; else novaPoraka.IdKompanii = user.Id; _poraki.SocuvajPoraka(novaPoraka); return RedirectToAction("Index"); }
public ActionResult IspratiMail() { var user = (LoggedInEntity)Session["LoggedInEntity"]; ViewPoraki poraka = new ViewPoraki(); poraka = _poraki.InicijalizirajViewPoraki(user.Id, user.UserType); return View(poraka); }