Exemple #1
0
 private void BSIPlanta_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         KC.Conexion.Limpiar();
         int iCount = Convert.ToInt32(this.xtraTabbedMdiManager1.MdiParent.MdiChildren.Count());
         iTodasPlantas = Convert.ToInt32(this.sEG_USUARIOSTableAdapter.getTodasPlantas(sAplicativo, sUsuario));
         if (iTodasPlantas == 0)
         {
             for (int i = 0; i <= iCount; i++)
             {
                 Form activeChild = this.ActiveMdiChild;
                 if (activeChild != null)
                 {
                     this.ActiveMdiChild.Close();
                 }
             }
             Dashboard_Dying.Login.FrmSelecPlanta frm = new Dashboard_Dying.Login.FrmSelecPlanta();
             frm.ShowDialog();
         }
         else
         {
             this.LlamarSelecciondePlantas();
         }
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemple #2
0
 public void LlamarSelecciondePlantas()
 {
     iTodasPlantas = Convert.ToInt32(this.sEG_USUARIOSTableAdapter.getTodasPlantas(sAplicativo, sUsuario));
     if (iTodasPlantas == 0)
     {
         Dashboard_Dying.Login.FrmSelecPlanta frmplantas = new Dashboard_Dying.Login.FrmSelecPlanta();
         frmplantas.ShowDialog();
     }
     else
     {
         Dashboard_Dying.Properties.Settings.Default.PlantaAsignada = "GILDAN";
         Dashboard_Dying.Properties.Settings.Default.NombrePlanta   = "GILDAN";
         Properties.Settings.Default.Save();
         this.setPlanta();
     }
 }