Esempio n. 1
0
 void ReadActivityValue(ContractsActivity activity)
 {
     if (activity == null)
     {
         throw new ArgumentNullException("activity");
     }
     activity.Description = Description;
 }
Esempio n. 2
0
 public ContractDto(int contractNo, string startDate, string endDate,
                    [NotNull] Customer customer, [NotNull] Property property, int agreedRent, int agreedDeposit,
                    string signDay, string signHijDate, string signGregDate, [NotNull] ContractsActivity activity, string selectedCourt)
 {
     ContractNo    = contractNo;
     StartDate     = startDate;
     EndDate       = endDate;
     Customer      = customer;
     Property      = property;
     AgreedRent    = agreedRent;
     AgreedDeposit = agreedDeposit;
     SignDay       = signDay;
     SignHijriDate = signHijDate;
     SignGregDate  = signGregDate;
     Activity      = activity;
     Court         = selectedCourt;
 }
Esempio n. 3
0
 private void Save()
 {
     try
     {
         if (!ValidActivity())
         {
             string msg = _validationRules[0].ErrorMessage;
             Logger.Log(LogMessageTypes.Info, msg);
             Helper.ShowMessage(msg);
             return;
         }
         var activity = new ContractsActivity();
         ReadActivityValue(activity);
         _unitOfWork.ContractsActivities.Add(activity);
         _unitOfWork.Save();
         RaiseViewStateChanged(ViewState.Saved);
     }
     catch (Exception ex)
     {
         string msg = Helper.ProcessExceptionMessages(ex);
         Logger.Log(LogMessageTypes.Error, msg, ex.TargetSite.ToString(), ex.StackTrace);
         Helper.ShowMessage(msg);
     }
 }