Beispiel #1
0
 private void SearchCustomer()
 {
     try
     {
         WIN.SCHEDULING_APP.GUI.Forms.FormRicercaCliente frm = new WIN.SCHEDULING_APP.GUI.Forms.FormRicercaCliente();
         if (frm.ShowDialog() == DialogResult.OK)
         {
             txtCust.EditValue = frm.SelectedCustomer;
         }
         frm.Dispose();
     }
     catch (Exception ex)
     {
         ErrorHandler.Show(ex);
     }
 }
Beispiel #2
0
 private void SearchCustomer()
 {
     try
     {
         WIN.SCHEDULING_APP.GUI.Forms.FormRicercaCliente frm = new WIN.SCHEDULING_APP.GUI.Forms.FormRicercaCliente();
         if (frm.ShowDialog() == DialogResult.OK)
         {
             txtCust.EditValue = frm.SelectedCustomer;
             _customer         = frm.SelectedCustomer;
             if (Properties.Settings.Default.Main_FillAppointmentLocationWithCustomerAddress)
             {
                 txtLoc.EditValue = string.Format("{0} {1} {2}", _customer.Residenza.Via, _customer.Residenza.Cap, _customer.Residenza.Comune.Descrizione);
             }
             cboZon.EditValue  = _customer.Resource;
             txtNote.EditValue = _customer.OtherDataSummary;
         }
         frm.Dispose();
     }
     catch (Exception ex)
     {
         ErrorHandler.Show(ex);
     }
 }
Beispiel #3
0
        private void cmdAdd_Click(object sender, EventArgs e)
        {
            try
            {
                WIN.SCHEDULING_APP.GUI.Forms.FormRicercaCliente frm = new WIN.SCHEDULING_APP.GUI.Forms.FormRicercaCliente();

                if (frm.ShowDialog() == DialogResult.OK)
                {
                    if (frm.SelectedCustomer != null)
                    {
                        if (!ExistCustomer(frm.SelectedCustomer))
                        {
                            lstCustomers.Items.Add(frm.SelectedCustomer);
                        }
                    }
                }
                frm.Dispose();
            }
            catch (Exception ex)
            {
                WIN.SCHEDULING_APP.GUI.Utility.ErrorHandler.Show(ex);
            }
        }