private Boolean ChangeClientCode() { Logger.Enter(); Boolean res = false; Prompt dlg = new Prompt(); while (DialogResult.OK == dlg.ShowDialog()) { Int64 id = Session.Instance.CheckBarCode(dlg.Value); if (0 == id) { dlg.Clear(); continue; } if (dbDataSet.clientsRow.Exists(id)) { UIMessages.Error(Session.GetResStr("client_exist")); dlg.Clear(); continue; } textCode.Text = dlg.Value; res = true; break; } Logger.Leave(); return res; }
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(); }