本文整理汇总了C#中WSGestion.WSGestion.SEL_GRID_Articulo方法的典型用法代码示例。如果您正苦于以下问题:C# WSGestion.WSGestion.SEL_GRID_Articulo方法的具体用法?C# WSGestion.WSGestion.SEL_GRID_Articulo怎么用?C# WSGestion.WSGestion.SEL_GRID_Articulo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WSGestion.WSGestion
的用法示例。
在下文中一共展示了WSGestion.WSGestion.SEL_GRID_Articulo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Carga_Grid
private void Carga_Grid()
{
DateTime Fecha;
DataTable dt = new DataTable();
dt.Columns.Add("Código", Type.GetType("System.String"));
dt.Columns.Add("Descripción", Type.GetType("System.String"));
dt.Columns.Add("Id Cat", Type.GetType("System.String"));
dt.Columns.Add("Categoría", Type.GetType("System.String"));
dt.Columns.Add("Id Centro", Type.GetType("System.String"));
dt.Columns.Add("Centro Atención", Type.GetType("System.String"));
dt.Columns.Add("Fecha", Type.GetType("System.String"));
dt.Columns.Add("Precio", Type.GetType("System.String"));
int cont = dt.Columns.Count;
WSGestion.WSGestion wsgest = new WSGestion.WSGestion();
wsgest.Url = ConfigurationManager.AppSettings.Get("dirWs");
List<WSGestion.MOD_Articulo> lista = wsgest.SEL_GRID_Articulo(centro, buscar).ToList();
for (int i = 0; i < lista.Count; i++)
{
dt.Rows.Add();
dt.Rows[dt.Rows.Count - 1]["Código"] = lista[i].ART_id_articulo;
dt.Rows[dt.Rows.Count - 1]["Descripción"] = lista[i].ART_descripcion;
dt.Rows[dt.Rows.Count - 1]["Id Cat"] = lista[i].ART_id_categoria_articulo;
dt.Rows[dt.Rows.Count - 1]["Categoría"] = lista[i].CAT_descripcion;
dt.Rows[dt.Rows.Count - 1]["Id Centro"] = lista[i].ART_id_centro_atencion;
dt.Rows[dt.Rows.Count - 1]["Centro Atención"] = lista[i].CEA_nombre;
Fecha = Convert.ToDateTime(lista[i].PRE_art_fecha);
dt.Rows[dt.Rows.Count - 1]["Fecha"] = Fecha.ToString("dd/MM/yyyy hh:mm tt");
dt.Rows[dt.Rows.Count - 1]["Precio"] = lista[i].PRE_art_precio;
}
gridview.DataSource = dt;
gridview.DataBind();
}
示例2: lista_resultados
private List<WSGestion.MOD_Articulo> lista_resultados()
{
WSGestion.WSGestion wsgest = new WSGestion.WSGestion();
wsgest.Url = ConfigurationManager.AppSettings.Get("dirWs");
List<WSGestion.MOD_Articulo> Lista = wsgest.SEL_GRID_Articulo(centro, buscar).ToList();
return Lista;
}