Пример #1
0
        private void lblFol_TextChanged(object sender, EventArgs e)
        {
            //Cargo el grid  de Articulo
            this.ListArti.DataBind();

            LArtiObra = ClsArticuloObra.BuscaArti_Obra(1, Convert.ToInt32(this.lblFol.Text));
            ListArtiObra.DataSource = LArtiObra;

            GridArticulos();

            ClsArticuloObra CA = new ClsArticuloObra();

            //Agrego los Articulos al Grid
            ClsArticuloObra.AddArtObraTmp(CA, 2, Convert.ToInt32(this.lblFol.Text));
        }
Пример #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            ClsArticuloObra CAO = new ClsArticuloObra();

            try
            {
                if (ListArti.Rows.Count == 0)
                {
                    MessageBox.Show("Debe seleccionar articulos para agregar...", "MENSAJE DEL SISTEMA", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                Ctn = Ctn + 1;

                foreach (Infragistics.Win.UltraWinGrid.UltraGridRow Rn in this.ListArti.Rows)
                {
                    if (Rn.Cells[11].Value.ToString().ToUpper() == "TRUE")
                    {
                        CAO.IdArticulo  = Convert.ToInt32(Rn.Cells[0].Value);
                        CAO.Descripcion = Convert.ToString(Rn.Cells[1].Value);
                        CAO.CantidadArt = Convert.ToDecimal(Rn.Cells[12].Value);

                        ClsArticuloObra.AddArtObraTmp(CAO, 1, 0);
                    }
                }

                LTmp = ClsArticuloObra.ListadoTmp();
                ListArtiObra.DataSource = LTmp;

                this.ListArtiObra.Rows.ColumnFilters[4].Column.Header.Caption = "Cantidad";
                try
                {
                    this.ListArtiObra.Rows.Band.Columns.Add("Elim", "Eliminar");
                    this.ListArtiObra.Rows.ColumnFilters[11].Column.CellAppearance.ImageBackground = SISCOC_FEL.Properties.Resources.delete1;
                    this.ListArtiObra.Rows.ColumnFilters[11].Column.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Image;
                    this.ListArtiObra.Rows.ColumnFilters[11].Column.Width = 65;
                }
                catch (Exception EX)
                {
                }

                GridArticulosTmp("");
            }
            catch (Exception EX)
            {
                MessageBox.Show(EX.Message.ToString());
            }
        }
Пример #3
0
        private void FrmArticulo_Obra_Load(object sender, EventArgs e)
        {
            ClsArticuloObra CAO = new ClsArticuloObra();

            CAO.IdArticulo     = 0;
            CAO.IdObra         = 0;
            CAO.Proveedor      = "";
            CAO.IdProveedor    = 0;
            CAO.Factura        = "";
            CAO.ArticuloTmp    = "";
            CAO.CantidadArt    = 0;
            CAO.Descripcion    = "";
            CAO.IdArticuloObra = 0;
            CAO.IdArticuloTmp  = 0;

            int Folio = 0;

            //AddArtObraTmp
            if (lblFol.Text.Trim() == "")
            {
                Folio = 0;
            }
            else
            {
                Folio = Convert.ToInt32(this.lblFol.Text.Trim());
            }

            ClsArticuloObra.AddArtObraTmp(CAO, 2, Convert.ToInt32(Folio));

            label3.Text              = "";
            label4.Text              = "";
            this.lblNomProv.Text     = "";
            this.lblNomVivienda.Text = "";

            //GridArticulos();

            this.Top  = (Screen.PrimaryScreen.WorkingArea.Height - this.Height) / 2;
            this.Left = (Screen.PrimaryScreen.WorkingArea.Width - this.Width) / 2;
        }