Exemplo n.º 1
0
        //public class CreditHistory
        //{
        //    public int credit  { get; set; }
        //    public int quantity_free  { get; set; }
        //    public int quantity_paid  { get; set; }
        //    public int credit_free  { get; set; }
        //    public int credit_paid { get; set; }
        //}

        public static void InsertMobileLog(int cn, string method, string parameters, int device, DVdPostMobileApIWS context)
        {
            try
            {
                string sql = QueriesDB.getInsertMobileLog(cn, method, parameters, device);
                context.ExecuteCommand(sql);
            }
            catch
            {
            }
        }
Exemplo n.º 2
0
 public static void InsertMobileLog(int cn, string method, string parameters, int device)
 {
     try
     {
         string             connstr      = ConfigurationManager.ConnectionStrings["mobileapiws"].ConnectionString;
         DVdPostMobileApIWS modelcontext = new DVdPostMobileApIWS(new MySqlConnection(connstr));
         string             sql          = QueriesDB.getInsertMobileLog(cn, method, parameters, device);
         modelcontext.ExecuteCommand(sql);
     }
     catch
     {
     }
 }
Exemplo n.º 3
0
        //public class CreditHistory
        //{
        //    public int credit  { get; set; }
        //    public int quantity_free  { get; set; }
        //    public int quantity_paid  { get; set; }
        //    public int credit_free  { get; set; }
        //    public int credit_paid { get; set; }
        //}

        public static void InsertMobileLog(int cn, string method, string parameters, int device, DVdPostMobileApIWS context)
        {
            string sql = string.Empty;

            try
            {
                sql = QueriesDB.getInsertMobileLog(cn, method, parameters, device);
                context.ExecuteCommand(sql);
            }
            catch (Exception e)
            {
                System.Diagnostics.EventLog hosteventLog = new System.Diagnostics.EventLog();
                ((System.ComponentModel.ISupportInitialize)(hosteventLog)).BeginInit();
                ((System.ComponentModel.ISupportInitialize)(hosteventLog)).EndInit();
                hosteventLog.Source = "PlushHTTPSServiceSource";
                hosteventLog.Log    = "PlushHTTPSServiceLog";
                hosteventLog.WriteEntry("InsertMobileLog cn, method, parameters, sql: " + cn + ", " + method + ", " + parameters + ", " + sql + ", error: " + e.Message, System.Diagnostics.EventLogEntryType.Error);
            }
        }