Esempio n. 1
0
 private void insertCurrencyCompleted(object sender, ThemLoThuocMoiCompletedEventArgs e)
 {
     try
     {
         if (!e.Result.MaLo.Equals(""))
         {
             this.currentLoThuoc.MaLo = e.Result.MaLo;
             this.messagePop.Successful(ValidatorResource.InsertSuccessful);
             Messenger.Default.Send(new ParentMessage()
             {
                 isEdit = this.isEdit, currentObject = this.currentLoThuoc
             });
         }
         else
         {
             this.messagePop.SetSingleError(ValidatorResource.ErrorInsert);
         }
     }
     catch (Exception)
     {
         this.messagePop.SetSingleError(CommonResource.errorCannotConnectServer);
     }
     finally
     {
         MyHelper.IsFree();
     }
 }
        private void insertCurrencyCompleted(object sender, ThemLoThuocMoiCompletedEventArgs e)
        {
            try
            {
                if (!e.Result.MaLo.Equals(""))
                {
                    this.currentLoThuoc.MaLo = e.Result.MaLo;
                    this.messagePop.Successful(ValidatorResource.InsertSuccessful);
                    Messenger.Default.Send(new ParentMessage() { isEdit = this.isEdit, currentObject = this.currentLoThuoc });

                }
                else
                {
                    this.messagePop.SetSingleError(ValidatorResource.ErrorInsert);
                }
            }
            catch (Exception)
            {
                this.messagePop.SetSingleError(CommonResource.errorCannotConnectServer);
            }
            finally
            {
                MyHelper.IsFree();
            }
        }