public static APIServiceProviderNamespace.main.li_reportsDataTable GetLIReports() { try { InitConnection(); li_reportsTableAdapter adapter = new li_reportsTableAdapter(); if (adapter.Connection != null) adapter.Connection.Close(); adapter.Connection = sqlCon; return adapter.GetData(); } catch (Exception exObj) { lastErrorString = exObj.Message; return null; } }
public static int AddLIReport(string name) { try { InitConnection(); li_reportsTableAdapter adapter = new li_reportsTableAdapter(); if (adapter.Connection != null) adapter.Connection.Close(); adapter.Connection = sqlCon; return Convert.ToInt32(adapter.sp_AddLIReport(name)); } catch (Exception exObj) { lastErrorString = exObj.Message; return 0; } }