public Main(bool _hayContext = false, Patient _pacienteContext = null, PlanningItem _planContext = null, User _usuarioContext = null, IEnumerable <PlanSum> _planSumsContext = null) { InitializeComponent(); leerPlantillas(); hayContext = _hayContext; pacienteContext = _pacienteContext; planContext = _planContext; usuarioContext = _usuarioContext; planSumsContext = _planSumsContext; habilitarBotones(); if (hayContext && pacienteContext == null) { MessageBox.Show("Debe abrir un paciente"); this.Close(); } else if (hayContext && planContext == null) { if (_planSumsContext != null) { PlanesSumaContext planesSumaContext = new PlanesSumaContext(planSumsContext); planesSumaContext.ShowDialog(); planContext = planesSumaContext.PlanSuma; //MessageBox.Show("Por ahora no se puede acceder a planes suma desde el script\nIngrese desde la aplicación"); //this.Close(); } else { MessageBox.Show("Debe seleccionar un plan"); this.Close(); } } else { } }
public Main(bool _hayContext = false, Patient _pacienteContext = null, PlanningItem _planContext = null, User _usuarioContext = null, IEnumerable <PlanSum> _planSumsContext = null, IEnumerable <PlanSetup> _plansContext = null) { InitializeComponent(); leerPlantillas(); hayContext = _hayContext; pacienteContext = _pacienteContext; planContext = _planContext; usuarioContext = _usuarioContext; planSumsContext = _planSumsContext; planesParaComparar = _plansContext; habilitarBotones(); eliminarArchivosParesEstructura(1); if (hayContext && planContext != null) { texto += Chequeos.chequeos(planContext, false); if (texto != "") { if (MessageBox.Show(texto, "Chequeos en plan actual") == DialogResult.OK) { } } else { if (MessageBox.Show("Todo bien", "Chequeos en plan actual") == DialogResult.OK) { } } } else if (hayContext && pacienteContext == null) { MessageBox.Show("Debe abrir un paciente"); this.Close(); } else if (hayContext && planContext == null) { if (_planSumsContext != null) { PlanesSumaContext planesSumaContext = new PlanesSumaContext(planSumsContext); planesSumaContext.ShowDialog(); planContext = planesSumaContext.PlanSuma; texto += Chequeos.chequeos(planContext, true); if (texto != "") { if (MessageBox.Show(texto, "Chequeos en plan actual") == DialogResult.OK) { } } else { if (MessageBox.Show("Todo bien", "Chequeos en plan actual") == DialogResult.OK) { } } } else { MessageBox.Show("Debe seleccionar un plan"); this.Close(); } } else { /*MessageBox.Show("Se va a hacer el chequeo"); * texto += Chequeos.chequeos(planContext, false); * if (texto != "") * { * MessageBox.Show(texto, "Chequeos en plan actual"); * } * else * { * MessageBox.Show("Todo bien", "Chequeos en plan actual"); * }*/ } }