public static bool GaDeleteTransactions(DateTime from, DateTime to, int profileid) { try { InitConnection(); ga_transactionsTableAdapter adapter = new ga_transactionsTableAdapter(); if (adapter.Connection != null) adapter.Connection.Close(); adapter.Connection = sqlCon; adapter.sp_GaDeleteTransactions(from, to, profileid); return true; } catch (Exception exObj) { lastErrorString = exObj.Message; string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase); System.IO.File.AppendAllText(path.Replace("file:\\", "") + "\\dblog.txt", "[GaDeleteTransactions - " + DateTime.Now.ToString() + "]" + exObj.Message + "\r\n"); } return false; }
public static bool GaAddTransaction(int orderid, int transactionid, int campaignid, string campaign, string source, string medium, string keyword, int profileid, int projectid, DateTime dt) { try { InitConnection(); ga_transactionsTableAdapter adapter = new ga_transactionsTableAdapter(); if (adapter.Connection != null) adapter.Connection.Close(); adapter.Connection = sqlCon; adapter.sp_GaAddTransaction(orderid, transactionid, campaignid, campaign, source, medium, keyword, profileid, projectid, dt); return true; } catch (Exception exObj) { lastErrorString = exObj.Message; string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase); System.IO.File.AppendAllText(path.Replace("file:\\", "") + "\\dblog.txt", "[GaAddAdSense - " + DateTime.Now.ToString() + "]" + exObj.Message + "\r\n"); } return false; }