Exemplo n.º 1
0
        public void SaveMinutesOfSession(vw_MinutesOfSession MinutesOfSession)
        {
            Cases_CaseSessions session = GetByID(MinutesOfSession.SessionID);

            session.MunitesOfSession = MinutesOfSession.Text;
            Update(session);
            Save();
        }
Exemplo n.º 2
0
        public ActionResult Create(MinutesOfSessionCreateViewModel MinutesOfSessionViewModel)
        {
            if (CurrentUser != null)
            {
                ViewData["SessionEnded"] = false;
                vw_MinutesOfSession vw_Minutes = new vw_MinutesOfSession()
                {
                    SessionID = MinutesOfSessionViewModel.MinutesOfSession.SessionID,
                    Text      = MinutesOfSessionViewModel.MinutesOfSession.Text,
                };
                if (MinutesOfSessionViewModel.MinutesOfSession.Text == null)
                {
                    return(CPartialView(PrepareViewModel(MinutesOfSessionViewModel.MinutesOfSession)).WithErrorMessages("برجاء كتابة المحضر"));
                }

                var result = SessionService.SaveMinutesOfSession(vw_Minutes);
                if (result == Base.SaveMinutesOfSessionStatus.Succeeded)
                {
                    ViewBag.Saved = true;
                    return(CPartialView(PrepareViewModel(MinutesOfSessionViewModel.MinutesOfSession)).WithSuccessMessages(JIC.Base.Resources.Messages.OperationCompletedSuccessfully));
                }
                else if (result == SaveMinutesOfSessionStatus.SessionSentToJudge)
                {
                    return(CPartialView(PrepareViewModel(MinutesOfSessionViewModel.MinutesOfSession)).WithErrorMessages("لا يمكن تعديل المحضر بعد إرساله للقاضى للتصديق"));
                }
                else if (result == SaveMinutesOfSessionStatus.SessionApprovedByJudge)
                {
                    return(CPartialView(PrepareViewModel(MinutesOfSessionViewModel.MinutesOfSession)).WithErrorMessages("لايمكن الحفظ تم التصديق من القاضى"));
                }
                else
                {
                    return(CPartialView(PrepareViewModel(MinutesOfSessionViewModel.MinutesOfSession)).WithErrorMessages(JIC.Base.Resources.Messages.OperationNotCompleted));
                }
            }

            else
            {
                ViewData["SessionEnded"] = true;
                return(CPartialView());
            }
        }
Exemplo n.º 3
0
 public SaveMinutesOfSessionStatus SaveMinutesOfSession(vw_MinutesOfSession MinutesOfSession)
 {
     if (SessionsComp.IsAppprovedByJudge(MinutesOfSession.SessionID))
     {
         return(SaveMinutesOfSessionStatus.SessionApprovedByJudge);
     }
     if (SessionsComp.IsSentToJudge(MinutesOfSession.SessionID))
     {
         return(SaveMinutesOfSessionStatus.SessionSentToJudge);
     }
     else
     {
         try
         {
             SessionsComp.SaveMinutesOfSession(MinutesOfSession);
             return(SaveMinutesOfSessionStatus.Succeeded);
         }
         catch (Exception ex)
         {
             HandleException(ex);
             return(SaveMinutesOfSessionStatus.Failed);
         }
     }
 }
Exemplo n.º 4
0
 public void SaveMinutesOfSession(vw_MinutesOfSession MinutesOfSession)
 {
     sessionsRepository.SaveMinutesOfSession(MinutesOfSession);
 }
Exemplo n.º 5
0
 public SaveMinutesOfSessionStatus SaveMinutesOfSession(vw_MinutesOfSession MinutesOfSession)
 {
     throw new NotImplementedException();
 }