Beispiel #1
0
        private void miVisualizaDF_Click(object sender, EventArgs e)
        {
            DataSet     DSDevuelve               = new DataSet();
            DataTable   DTMain                   = new DataTable();
            DataView    DVMain                   = new DataView();
            Element     el                       = GGCPersLiq.TableControl.Table.CurrentElement;
            DataRowView drv                      = (el as Record).GetData() as DataRowView;
            string      LCorrelativo             = "";
            string      LIDTipoDocumento         = "";
            string      LProveedor               = "";
            string      LNumeroDocumento         = "";
            string      LDenominacion            = "";
            string      LIDPartida               = "";
            string      LPartida                 = "";
            string      Lserie                   = "";
            string      LNumero                  = "";
            string      LMoneda                  = "";
            string      LPendiente               = "";
            string      Lobservaciones           = "";
            string      LFecha                   = "";
            string      LUsuario                 = "";
            string      LHoras                   = "";
            string      LIDProyecto              = "";
            string      LRuc                     = "";
            string      LIDformapago             = "";
            string      Ldocumentopago           = "";
            string      LFPP                     = "";
            string      detallecosto_Correlativo = "";

            if (el != null)
            {
                if (drv[6].ToString() != "")
                {
                    if (el != null)
                    {
                        if (el is GridRecord)
                        {
                            detallecosto_Correlativo = drv[6].ToString(); //show column 2
                        }
                    }
                }
                else
                {
                    MessageBoxAdv.Show("Debe de seleccionar un registro a eliminar ", "Información", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
            }
            WSAdministracion.WSAdministracion WSAdmin = new WSAdministracion.WSAdministracion();
            WSAdmin.Url = mdlGenerales.DireccionWS + "FazServices/WSAdministracion.asmx";

            DSDevuelve = WSAdmin.DevuelveDetalleComprasUno(mdlGenerales.Conexion, detallecosto_Correlativo);
            DTMain     = DSDevuelve.Tables[0];

            foreach (DataRow Row in DTMain.Rows)
            {
                LCorrelativo     = Row[1].ToString();
                LIDTipoDocumento = Row[2].ToString();
                LNumeroDocumento = Row[4].ToString();
                LProveedor       = Row[5].ToString();;
                LDenominacion    = Row[6].ToString();
                Lserie           = Row[7].ToString();
                LNumero          = Row[8].ToString();
                LMoneda          = Row[10].ToString();
                LPendiente       = Row[12].ToString();
                Lobservaciones   = Row[13].ToString();
                LFecha           = Row[14].ToString();
                LUsuario         = Row[16].ToString();
                LHoras           = Row[18].ToString();
                LIDProyecto      = Row[19].ToString();
                LRuc             = Row[22].ToString();
                LIDformapago     = Row[23].ToString();
                Ldocumentopago   = Row[25].ToString();
                LFPP             = Row[26].ToString();
            }
            MFRegistroDocumentos frm = new MFRegistroDocumentos();

            frm.Show();
            frm.Cargarfactura(LCorrelativo, LIDTipoDocumento, LProveedor,
                              LNumeroDocumento, LDenominacion, Lserie, LNumero, LMoneda,
                              LPendiente, Lobservaciones, LFecha, LHoras, LRuc, LIDProyecto,
                              LIDformapago, Ldocumentopago, LFPP, LUsuario);
        }