dataview en datatable
Publicado por ZeroX (3 intervenciones) el 28/03/2017 17:30:07
buenos dias
tengo el siguiente problema necesito mostrar o convertir este datatable en un datatable, porque al exportar la informacion me muestra que no puedo convertirlo el codigo es
tengo el siguiente problema necesito mostrar o convertir este datatable en un datatable, porque al exportar la informacion me muestra que no puedo convertirlo el codigo es
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
private DataView LlenarGrid(string sortDireccion, string sortExression, bool consultaNueva)
{
string idMoneda;
DataView dtaView = null;
try
{
if (Session["table"] == null || consultaNueva)
{
using (DAConexion cnx = Utilerias.IniciarConexion(Session))
{
if (ddlMoneda.SelectedValue == "")
{
idMoneda = "-1";
}
else
{
idMoneda = ddlMoneda.SelectedValue.ToString();
}
dtaView = Catalogos.CatalogoProductos(cnx, chbEsImportado.Checked, ((Companias)Session["compania"]).IdCompania, txtCodigo.Text, txtDescripcion.Text, idMoneda).DefaultView;
}
Session["table"] = dtaView;
lblNumRegistros.Text = dtaView.Count.ToString("##,##0");
}
else
{
dtaView = (DataView)Session["table"];
}
if (sortExression != string.Empty)
{
dtaView.Sort = string.Format("{0} {1}", sortExression, Session["sortOrder"].ToString());
}
}
catch (Exception ex)
{
ucMessageBox.ShowMessage(ex.Message);
}
return dtaView;
}
Valora esta pregunta


0