Ejemplo n.º 1
0
        public int UpdateToneMarkingLogs(ToneMarkingLog log)
        {
            try
            {
                log.ClientIp = HttpContext.Current.Request.Headers["X-Forwarded-For"] ?? HttpContext.Current.Request.UserHostAddress;
                return(new DataSystem().UpdateToneMarkingLog(log));
            }

            catch
            {
                return(0);
            }
        }
Ejemplo n.º 2
0
        public HttpResponseMessage Put(ToneMarkingLog log)
        {
            try
            {
                var result = _yorubaSystem.UpdateToneMarkingLogs(log);
                return(new HttpResponseMessage(System.Net.HttpStatusCode.OK));
            }

            catch (Exception ex)
            {
                return(new HttpResponseMessage(System.Net.HttpStatusCode.InternalServerError));
            }
        }
Ejemplo n.º 3
0
        internal int UpdateToneMarkingLog(ToneMarkingLog log)
        {
            string queryString = @"update ToneMarkingLogs set Output = @output, LastModificationTime = CURRENT_TIMESTAMP where Id = @id and ClientIp = @clientIp;";

            return(new OrmSystem().RunChangeQuery(queryString, _yorubaConnectionString, new List <RdbmsParameter> {
                new Business.RdbmsParameter {
                    Name = "@output", Value = log.Output
                },
                new Business.RdbmsParameter {
                    Name = "@id", Value = Convert.ToString(log.Id)
                },
                new Business.RdbmsParameter {
                    Name = "@clientIp", Value = log.ClientIp
                }
            }));
        }