Exemplo n.º 1
0
 public static DataTable Select(string SelectStatment)
 {
     using (MyDataLayer.MyData my = new MyDataLayer.MyData(ConfigurationManager.ConnectionStrings["con"].ConnectionString))
     {
         DataTable table = (DataTable)my.MyMethod(SelectStatment, MyDataLayer.MyData.TypeStatment.Select);
         return(table);
     }
 }
Exemplo n.º 2
0
 public static void SelectData(ReportViewer viewer, string StoredProcdureName)
 {
     using (MyDataLayer.MyData my = new MyDataLayer.MyData(ConfigurationManager.ConnectionStrings["con"].ConnectionString))
     {
         DataTable table   = (DataTable)my.MyMethod(StoredProcdureName, null, MyDataLayer.MyData.TypeStatment.Select);
         var       element = new ReportDataSource("DataSet1", table);
         viewer.LocalReport.DataSources.Clear();
         viewer.LocalReport.DataSources.Add(element);
         viewer.RefreshReport();
     }
 }