static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); while (true) { using (LB.Login.frmLogin login = new Login.frmLogin()) { Application.Run(login); if (LoginInfo.IsVerifySuccess) { using (MainForm mainForm = new MainForm()) { Application.Run(mainForm); if (!mainForm.bolIsCancel) { break; } } } else { break; } } } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Config.DesignerSettings.CustomReportUpload += new FastReport.Design.ReportUploadEventHandler(ReportTemplateProcess.CustomReportUpload); while (true) { using (LB.Login.frmLogin login = new Login.frmLogin()) { Application.Run(login); if (LoginInfo.IsVerifySuccess) { if (LoginInfo.UserType == 0)//地磅文员 { using (WeightForm2 mainForm = new WeightForm2()) { Application.Run(mainForm); if (!mainForm.bolIsCancel) { break; } } } else { using (MasterMainForm mainForm = new MasterMainForm()) { Application.Run(mainForm); if (!mainForm.bolIsCancel) { break; } } } } else { break; } } } }
private void cargar() { Login.frmLogin frmlogin = new Login.frmLogin(); while (!Resources.Propiedades.flag) { frmlogin.ShowDialog(); } string nombre_medico = Resources.Propiedades.nombre_ingreso; int categoria_medico = Resources.Propiedades.categoria; lb_nom.Text = nombre_medico; switch (categoria_medico) { case 1: MenuMedicos.Enabled = false; MenuPacientes.Enabled = false; MenuProcedimientos.Enabled = false; mst.Enabled = false; break; case 2: MenuConsulta.Enabled = false; MenuMedicos.Enabled = false; MenuPacientes.Enabled = false; mst.Enabled = false; break; case 3: break; case 4: //super usuario inicial break; default: //Application.Exit(); break; } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //先开启服务 bool bolExists = false; Process[] processAry = Process.GetProcesses(); foreach (Process peo in processAry) { if (peo.ProcessName.Contains("LB.Web.ServerTool") && !peo.ProcessName.Contains("LB.Web.ServerTool.vshost")) { bolExists = true; break; } } if (!bolExists) { DirectoryInfo directInfo = new DirectoryInfo(Application.StartupPath); if (directInfo.Parent != null) { string strServerPath = directInfo.Parent.FullName; string strServerName = Path.Combine(strServerPath, "LB.Web.ServerTool.exe"); if (File.Exists(strServerName)) { Process.Start(strServerName); } } } while (true) { using (LB.Login.frmLogin login = new Login.frmLogin()) { Application.Run(login); if (LoginInfo.IsVerifySuccess) { if (login.ProductType == 1) { using (WeightForm2 mainForm = new WeightForm2()) { Application.Run(mainForm); if (!mainForm.bolIsCancel) { break; } } } else if (login.ProductType == 2) { using (WeightFormCalcalute mainForm = new WeightFormCalcalute()) { Application.Run(mainForm); if (!mainForm.bolIsCancel) { break; } } } } else { break; } } } }