Beispiel #1
0
        public bool UpdateReflashHistory(ReflashHistory history, string token)
        {
            ITokenValidator validator = new DatabaseTokenValidator();

            if (validator.IsValid(token))
            {
                return(new VtecTeamDBManager().UpdateReflashHistory(history));
            }
            throw new FaultException("Срок рабочей сессии истек, преезапустите программу");
        }
 public bool UpdateReflashHistory(ReflashHistory history)
 {
     try
     {
         var resultReview = adoPersister.ExecuteAsSingle(persister => persister.Save(adoRepository.Evict(history.Review)));
         history.Review = resultReview;
         adoPersister.ExecuteAsSingle(persister => persister.Save(adoRepository.Evict(history)));
         return(true);
     }
     catch (Exception ex)
     {
         Log.Error("При сохранении сущности {0} произошла ошибка {1}", ex, history.GetType());
         return(false);
     }
 }
        public ReflashHistoryWithReviewForm(ReflashHistory history)
        {
            InitializeComponent();
            this.history               = history;
            txtBynaryFileName.Text     = history.BinaryFileName;
            txtVin.Text                = history.CarVin;
            txtPreviousBinaryName.Text = history.PreviousBinaryName;
            txtReflashDate.Text        = history.ReflashDate.ToString();
            txtPrice.Text              = history.Price;
            txtStatus.Text             = StatusResolver.ResolveReflashStatus(history.Status);

            if (history.Review == null)
            {
                txtCarOvner.Enabled   = true;
                txtReview.Enabled     = true;
                btnSendReview.Enabled = true;
            }
            else
            {
                txtCarOvner.Text      = history.Review.UserName;
                txtReview.Text        = history.Review.UserReview;
                chbEditReview.Visible = true;
            }
        }
Beispiel #4
0
 public bool UpdateReflashHistory(ReflashHistory history)
 {
     return(vtServiceFacade.UpdateReflashHistory(history, incomingUserInfo));
 }