public SaveCourtCaseStrategy(CourtCase cc)
     : base()
 {
     if (cc == null)
     {
         throw new ArgumentNullException("courtCase");
     }
     _courtCase = cc;
 }
 public ReissueCourtCaseStrategy(IDataManager dataManagerInstance
     , DocketRecord docket
     , CourtCase courtCase)
     : base()
 {
     if (docket == null)
     {
         throw new ArgumentNullException("docket");
     }
     if (dataManagerInstance == null)
     {
         throw new ArgumentNullException("dataManagerInstance");
     }
     _docket = docket;
     _courtCase = courtCase;
     _dataManagerInstance = dataManagerInstance;
 }
        public override void Execute()
        {
            this.Logger.Info("Trying to create a new court case...");
            var courtCase = new CourtCase()
            {
                CaseNumber = _caseNumber,
                CourtClerkId = _courtClerkId,
                RestrainingPartyIdentificationInformation = new RestrainingPartyIdentificationInformation(),
            };
            courtCase.CaseHistory = new List<CaseHistory>()
                {
                    new CaseHistory()
                    {
                        Date = DateTime.Now,
                        CaseHistoryEvent = Model.Enums.CaseHistoryEvent.File,
                        CourtClerk = DataManager.UserRepository.GetById(_courtClerkId),
                    }
                };
            DataManager.CourtCaseRepository.Insert(courtCase);

            DataManager.Commit();
            CourtCase = courtCase;
            this.Logger.Info("The new court case created.");
        }
 private void AddToDocket(DocketRecord docket, CourtCase courtCase)
 {
     using (AddToCourtDocketStrategy s = new AddToCourtDocketStrategy(DataManager, docket, courtCase))
     {
         s.Execute();
     }
 }
 private void DismissCourtCase(DocketRecord docket, CourtCase courtCase)
 {
     using (DismissCourtCaseStrategy s = new DismissCourtCaseStrategy(DataManager, docket, courtCase))
     {
         s.Execute();
     }
 }
 private void ReissueCourtCase(DocketRecord docket, CourtCase courtCase)
 {
     using (ReissueCourtCaseStrategy s = new ReissueCourtCaseStrategy(DataManager, docket, courtCase))
     {
         s.Execute();
     }
 }