private void MenuItemFirms_Click(object sender, EventArgs e) { //Cfg.LogWrite("Пользователь " + UserInfo.UserName.Trim() + " открыл форму настройки организаций."); frmOrganizations config = new frmOrganizations(); config.ShowDialog(); }
private static void InitAndRun() { Logging.Init(ConnectionSettings.GetServer(), ConnectionSettings.GetDatabase(), ConnectionSettings.GetUsername(), ConnectionSettings.GetPassword(), ConnectionSettings.ProgramName); Logging.StartFirstLevel(1); Logging.Comment("Вход в программу"); Logging.StopFirstLevel(); Logger.NewMessage("начало работы"); Procedures proc = new Procedures(ConnectionSettings.GetServer(), ConnectionSettings.GetDatabase(), ConnectionSettings.GetUsername(), ConnectionSettings.GetPassword(), ConnectionSettings.ProgramName); decimal? value = null; while (value == null) { DataTable temp = proc.GetConfig("prnc"); if (temp != null && temp.Rows.Count > 0) { value = decimal.Parse(temp.Rows[0]["value"].ToString()); } else { frmOrganizations config = new frmOrganizations(); config.ShowDialog(); } } Application.Run(new mainForm()); Logging.StartFirstLevel(2); Logging.Comment("Выход из программы"); Logging.StopFirstLevel(); Logger.NewMessage("конец работы"); }