Exemplo n.º 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)
                {
                    Customer c = null;
                    c = frm.SelectedCustomer;
                    txtCust.EditValue         = c;
                    controller.CustomCustomer = c;

                    if (Properties.Settings.Default.Main_FillAppointmentLocationWithCustomerAddress)
                    {
                        txtLoc.EditValue = string.Format("{0} {1} {2}", c.Residenza.Via, c.Residenza.Cap, c.Residenza.Comune.Descrizione);
                    }
                    cboZon.EditValue  = c.Resource;
                    txtNote.EditValue = c.OtherDataSummary;
                }
                frm.Dispose();
            }
            catch (Exception ex)
            {
                ErrorHandler.Show(ex);
            }
        }
Exemplo n.º 2
0
 //pulsante per ricercare un id
 private void commandBar1_FindElementIdCommandPressed(object sender, EventArgs e)
 {
     try
     {
         WIN.SCHEDULING_APP.GUI.Forms.FormRicercaCliente frm = new WIN.SCHEDULING_APP.GUI.Forms.FormRicercaCliente();
         if (frm.ShowDialog() == DialogResult.OK)
         {
             commandBar1.Custom_SetIdentifier(frm.SelectedId.ToString());
         }
         frm.Dispose();
     }
     catch (Exception ex)
     {
         ErrorHandler.Show(ex);
     }
 }