protected void btnAceptarImportar_Click(object sender, EventArgs e)
        {
            int    registros = 0;
            string sPathArchivo;

            try
            {
                ValidaVariables();

                if ((File1.PostedFile == null) || (File1.PostedFile.ContentLength == 0))
                {
                    throw new Exception("MsgSelArchHdr");
                }

                //Copia el archivo
                string fn = System.IO.Path.GetFileName(File1.PostedFile.FileName);

                sPathArchivo = Server.MapPath("") + "\\Data\\Costos." + fn.Substring(fn.Length - 3, 3);

                try
                {
                    File1.PostedFile.SaveAs(sPathArchivo);
                }
                catch (Exception ex)
                {
                    MessageBox(sender, e, ((Idioma)Session["oIdioma"]).Texto("MsgErrorCopiarArchivo"));
                }

                try
                {
                    NegocioPF.CostosInd oCostos = new NegocioPF.CostosInd();

                    registros = oCostos.ImportarTXT(((Usuario)Session["oUsuario"]).Id, sPathArchivo,
                                                    System.IO.Path.GetFileName(File1.PostedFile.FileName));

                    NegocioPF.Proveedor oProveedor = new NegocioPF.Proveedor(((Usuario)Session["oUsuario"]).Id);
                    oProveedor.Cargar();

                    oCostos = new NegocioPF.CostosInd();
                    if (oProveedor.Nombre != "" && oProveedor.Nombre != null)
                    {
                        oCostos.Cargar(((Usuario)Session["oUsuario"]).Id, "");
                    }
                    else
                    {
                        oCostos.Cargar();
                    }
                    grdCostos.DataSource = oCostos.Datos;
                    grdCostos.DataBind();
                    divImportar.Visible = false;

                    MessageBox(sender, e, ((Idioma)Session["oIdioma"]).Texto("MsgRegActInsertados") + registros.ToString());
                }
                catch (Exception ex)
                {
                    MessageBox(sender, e, "Error:" + ((Idioma)Session["oIdioma"]).Texto(ex.Message));
                }
            }
            catch (Exception ex)
            {
                MessageBox(sender, e, ((Idioma)Session["oIdioma"]).Texto(ex.Message));
            }
        }