Exemplo n.º 1
0
 private void EditEnded(object sender, System.Windows.Controls.DataFormEditEndedEventArgs e)
 {
     if (e.EditAction == DataFormEditAction.Commit)
     {
         m_riaContext.SubmitChanges(SubmitComplete, null);
     }
 }
Exemplo n.º 2
0
 private void OrderDataForm_EditEnded(object sender, DataFormEditEndedEventArgs e)
 {
     if (e.EditAction == DataFormEditAction.Commit)
     {
         var order = OrderDataForm.CurrentItem as SalesOrderHeader;
         _Proxy.UpdateSalesOrderHeaderAsync(order);
     }
 }
Exemplo n.º 3
0
        private void EditEnded(object sender, System.Windows.Controls.DataFormEditEndedEventArgs e)
        {
            if (e.EditAction == DataFormEditAction.Commit)
            {
                UIHelper.SetText(m_statusTextBlock, "Attempting to create your account, please wait...");

                Customer customer = (sender as DataForm).CurrentItem as Customer;
                m_riaContext.Customers.Add(customer);
                m_riaContext.SubmitChanges(CreateCustomerComplete, customer);
            }
        }
Exemplo n.º 4
0
 private void ProjectForm_EditEnded(object sender, DataFormEditEndedEventArgs e)
 {
     switch (e.EditAction)
     {
         case DataFormEditAction.Cancel:
             DialogResult = false;
             break;
         case DataFormEditAction.Commit:
             DialogResult = true;
             break;
     }
 }
Exemplo n.º 5
0
 private void dataForm1_EditEnded(object sender, DataFormEditEndedEventArgs e)
 {
     ProdottoContext context = ddsProdotti.DomainContext as ProdottoContext;
     if (context.HasChanges)
     {
         try
         {
             context.SubmitChanges();
         }
         catch (Exception ex)
         {
             ErrorWindow.CreateNew(ex);
         }
     }
 }
        void newTransactionForm_EditEnded(object sender, DataFormEditEndedEventArgs e)
        {
           
            busyIndicator.IsBusy = true;

            //Call Server
            if (WebContext.Current.User.Role == ((int)Server.ClientRole.admin).ToString())
            {
                TransactionInfoBalcon transactionInfo = newTransactionForm.CurrentItem as TransactionInfoBalcon;
                App.client.NewTransactionBalconCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_NewTransactionCompleted);
                App.client.NewTransactionBalconAsync(transactionInfo.ClientEmail, transactionInfo.Type, transactionInfo.Quantity, transactionInfo.SockType);
            }
            else
            {
                TransactionInfo transactionInfo = newTransactionForm.CurrentItem as TransactionInfo;
                App.client.NewTransactionCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_NewTransactionCompleted);
                App.client.NewTransactionAsync(transactionInfo.Type, transactionInfo.Quantity, transactionInfo.SockType);
            }
        }
Exemplo n.º 7
0
        void UmowyDataForm_EditEnded(object sender, DataFormEditEndedEventArgs e)
        {
            CheckPendingChanges(e);

            if (e.EditAction == DataFormEditAction.Commit)
                PracownicyDataForm.IsEnabled = false;
        }
Exemplo n.º 8
0
 //        private void OKButton_Click(object sender, RoutedEventArgs e)
 //        {
 //            TimeEntryForm.CommitEdit();
 //            DialogResult = true;
 //        }
 //
 //        private void CancelButton_Click(object sender, RoutedEventArgs e)
 //        {
 //            TimeEntryForm.CancelEdit();
 //            DialogResult = false;
 //        }
 private void TimeEntryForm_EditEnded(object sender, DataFormEditEndedEventArgs e)
 {
     DialogResult = e.EditAction == DataFormEditAction.Commit;
 }
Exemplo n.º 9
0
 /// <summary>
 /// Raises the ItemEditEnded event.
 /// </summary>
 /// <param name="e">The event args.</param>
 protected virtual void OnItemEditEnded(DataFormEditEndedEventArgs e)
 {
     EventHandler<DataFormEditEndedEventArgs> handler = this.EditEnded;
     if (handler != null)
     {
         handler(this, e);
     }
 }
Exemplo n.º 10
0
 public void ExecuteSaveIssue(DataFormEditEndedEventArgs args)
 {
     var issue = Issues.CurrentItem as Web.Models.Issue;
     if (args.EditAction == DataFormEditAction.Cancel)
     {
         _context.RejectChanges();
         if (_isNewItem)
             Issues.MoveCurrentToPrevious();
         return;
     }
     issue.ProjectId = CurrentProjectId;
     if (_context.HasChanges)
     {
         _context.SubmitChanges();
     }
     _isNewItem = false;
     AutoEditAllowed = false;
     RaisePropertyChanged(() => AutoEditAllowed);
 }
 private void PreOrderDataForm_EditEnded(object sender, DataFormEditEndedEventArgs e)
 {
     PreOrderDo(true);
 }
 private void DataForm_EditEnded(object sender, DataFormEditEndedEventArgs e)
 {
     if (e.EditAction == DataFormEditAction.Cancel)
     {
         MaterialsViewModel.CancelEdit();
     }
     MaterialsViewModel.EndEdit();
 }
        private void OnEndEdit(DataFormEditEndedEventArgs e)
        {
            if (e.EditAction == DataFormEditAction.Commit)
            {
                this._context.SubmitChanges(
                    t =>
                    {
                        if (t.HasError)
                        {
                            _context.RejectChanges();

                            ErrorWindow.CreateNew(t.Error);
                            t.MarkErrorAsHandled();
                        }
                    },
                    null);
            }
        }