Ejemplo n.º 1
0
 private void OpenCustomer()
 {
     try
     {
         OpenCustomerDialog ocd = new OpenCustomerDialog(OpenCustomerDialog.SearchField.CustomerName);
         if (ocd.ShowDialog() == true)
         {
             var customer = SearchCustomer(ocd.SelectedCustomer.CustomerId);
             ShowCustomer(customer);
             RaiseViewStateChanged(ViewState.Saved);
         }
     }
     catch (Exception ex)
     {
         string msg = Helper.ProcessExceptionMessages(ex);
         Logger.Log(LogMessageTypes.Error, msg, ex.TargetSite.ToString(), ex.StackTrace);
         Helper.ShowMessage(msg);
     }
 }
Ejemplo n.º 2
0
        void AddCustomer()
        {
            OpenCustomerDialog ocd = new OpenCustomerDialog(OpenCustomerDialog.SearchField.CustomerCode);

            if (ocd.ShowDialog() == true)
            {
                try
                {
                    var customer = ocd.SelectedCustomer;
                    ShownViewClaim = CreateViewClaim(customer);
                    ControlModelState(ModelState.InEdit);
                }
                catch (Exception ex)
                {
                    string msg = Helper.ProcessExceptionMessages(ex);
                    Logger.Log(LogMessageTypes.Error, msg, ex.TargetSite.ToString(), ex.StackTrace);
                    Helper.ShowMessage(msg);
                }
            }
        }