private void EditClient() { Logger.Enter(); do { dbDataSet.VClientsRow cr = GetSelectedRow(); Int32 id = 0; if (null != cr) { id = cr.id; } ClientInfo ci = new ClientInfo(id); if (DialogResult.OK != ci.ShowDialog(this)) break; Db.Instance.Adapters.VClientsTableAdapter.Fill(Db.Instance.dSet.VClients); } while (false); Logger.Leave(); }
private void SearchClient() { Logger.Enter(); Prompt dlg = new Prompt(); dlg.Text = "Search client by code"; while (DialogResult.OK == dlg.ShowDialog()) { Int32 id = Session.Instance.CheckBarCode(dlg.Value); if (0 == id) { dlg.Clear(); continue; } dbDataSet.clientsRow cr = Db.Instance.dSet.clients.FindByid(id); if (null != cr) { ClientInfo ci = new ClientInfo(cr.id); if (DialogResult.OK == ci.ShowDialog(this)) { Logger.Debug("Client data changed for: " + ci.ClientName + " " + ci.ClientCode); } } else { UIMessages.Warning( Session.GetResStr("unregistered_client")); } dlg.Clear(); } Logger.Leave(); }
private void ShowClientInfo(object sender, DataGridViewCellEventArgs e) { Logger.Enter(); Int32 clientId = (Int32)dataGridView1.Rows[e.RowIndex].Cells["colOTId"].Value; ClientInfo ci = new ClientInfo(clientId); ci.ShowDialog(); Logger.Leave(); }
private void AddClient() { Logger.Enter(); ClientInfo ci = new ClientInfo(0); ci.ShowDialog(this); Logger.Leave(); }