Esempio n. 1
0
        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;
            }
        }
Esempio n. 2
0
        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;
            }
        }