Beispiel #1
0
 private void ArticuloObraToolStripMenuItem_Click(object sender, EventArgs e)
 {
     // FrmArticulo_Obra
     if (ultraTabbedMdiManager1.ActiveTab != null && strarticulo_obra == "Articulo Vivienda")
     {
         MdiTabGroup tabGroup = this.ultraTabbedMdiManager1.TabGroups[0];
         for (int j = tabGroup.Tabs.Count - 1; j >= 0; j--)
         {
             Operador = j;
             if (((Infragistics.Win.UltraWinTabbedMdi.MdiTab)(this.ultraTabbedMdiManager1.ActiveTab.TabGroup.Tabs.All[Operador])).TextResolved == "Articulo Vivienda")
             {
                 int Ren = (((Infragistics.Win.UltraWinTabbedMdi.MdiTab)(this.ultraTabbedMdiManager1.ActiveTab.TabGroup.Tabs.All[Operador]))).Index;
                 ultraTabbedMdiManager1.ActiveTab.TabGroup.Tabs[Ren].Activate();
             }
             else
             {
                 Boolean ban = false;
                 for (int x = tabGroup.Tabs.Count - 1; x >= 0; x--)
                 {
                     if (((Infragistics.Win.UltraWinTabbedMdi.MdiTab)(this.ultraTabbedMdiManager1.ActiveTab.TabGroup.Tabs.All[x])).TextResolved == "Articulo Vivienda")
                     {
                         ban = true;
                     }
                 }
                 if (ban == false)
                 {
                     strarticulo_obra = string.Format("Articulo Vivienda");
                     FrmArticulo_Obra RepArti_Obra = new FrmArticulo_Obra(Permiso);
                     RepArti_Obra.Text      = strarticulo_obra;
                     RepArti_Obra.MdiParent = this;
                     RepArti_Obra.Show();
                 }
             }
         }
     }
     else
     {
         strarticulo_obra = string.Format("Articulo Vivienda");
         FrmArticulo_Obra RepArti_Obra = new FrmArticulo_Obra(Permiso);
         RepArti_Obra.Text      = strarticulo_obra;
         RepArti_Obra.MdiParent = this;
         RepArti_Obra.Show();
     }
 }
Beispiel #2
0
        private void ultraGrid1_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
        {
            string IdObra  = "";
            string Obra    = "";
            string IdProv  = "";
            string Prov    = "";
            string IdKit   = "";
            string NomKit  = "";
            string preciou = "";



            if (_Origen == "O")
            {
                IdObra = Convert.ToString(e.Row.Cells[7].Text);
                Obra   = Convert.ToString(e.Row.Cells[8].Text);

                if (_Accion == 0)
                {
                    FrmArticulo_Obra frmart = (FrmArticulo_Obra)Application.OpenForms["FrmArticulo_Obra"];
                    frmart.Controls["groupBox1"].Controls["textBox1"].Text = IdObra;
                    //frmart.Controls["groupBox1"].Controls["txtNombreObra"].Text = Obra;
                    frmart.Controls["groupBox1"].Controls["lblNomVivienda"].Text = Obra;
                    frmart.Controls["groupBox1"].Controls["label3"].Text         = IdObra;
                }

                if (_Accion == 1)
                {
                    FrmFiltroObra frmfilt = (FrmFiltroObra)Application.OpenForms["FrmFiltroObra"];
                    frmfilt.Controls["textBox1"].Text = IdObra;
                    frmfilt.Controls["textBox2"].Text = Obra;
                }
            }

            if (_Origen == "P")
            {
                IdProv = Convert.ToString(e.Row.Cells[15].Text);
                Prov   = Convert.ToString(e.Row.Cells[16].Text);


                FrmArticulo_Obra frmartP = (FrmArticulo_Obra)Application.OpenForms["FrmArticulo_Obra"];
                frmartP.Controls["groupBox1"].Controls["txtIdProv"].Text = IdProv;
                //frmartP.Controls["groupBox1"].Controls["txtNomProv"].Text = Prov;
                frmartP.Controls["groupBox1"].Controls["lblNomProv"].Text = Prov;
                frmartP.Controls["groupBox1"].Controls["label4"].Text     = IdProv;
            }

            if (_Origen == "T")
            {
                IdObra = Convert.ToString(e.Row.Cells[7].Text);
                Obra   = Convert.ToString(e.Row.Cells[8].Text);


                FrmTraspaso tras = (FrmTraspaso)Application.OpenForms["FrmTraspaso"];
                tras.Controls["groupBox3"].Controls["txtIdObraDest"].Text = IdObra;
                tras.Controls["groupBox3"].Controls["txtObraDest"].Text   = Obra;
            }


            if (_Origen == "A")
            {
                IdKit   = Convert.ToString(e.Row.Cells[5].Text);
                NomKit  = Convert.ToString(e.Row.Cells[6].Text);
                preciou = Convert.ToString(e.Row.Cells[2].Text);

                FrmArticulo Artis = (FrmArticulo)Application.OpenForms["FrmArticulo"];
                Artis.Controls["groupBox1"].Controls["txtArt"].Text      = NomKit;
                Artis.Controls["groupBox1"].Controls["lblNKit"].Text     = IdKit;
                Artis.Controls["groupBox1"].Controls["lblNKit2"].Text    = IdKit;
                Artis.Controls["groupBox1"].Controls["txtPreU"].Text     = preciou;
                Artis.Controls["groupBox1"].Controls["lblIdKit"].Visible = true;
                Artis.Controls["groupBox1"].Controls["lblNKit"].Visible  = true;
                Artis.Controls["groupBox1"].Controls["lblNKit2"].Visible = true;
            }

            this.Close();
        }