예제 #1
0
        public HttpResponseMessage InsertSMSLogsMaster([FromBody] clssmslogs request)
        {
            LoggerFactory.LoggerInstance.LogDebug("Request Started for : " + request.SmsLogID + " sms id :" + request.SmsID);
            HttpResponseMessage response = new HttpResponseMessage();

            try
            {
                sms_logsService objComService = new sms_logsService();
                var             objResponse   = objComService.InsertSMSLogsMaster(request);
                if (objResponse != null && objResponse.ToString() != "")
                {
                    response = Request.CreateResponse(HttpStatusCode.OK, objResponse);
                    LoggerFactory.LoggerInstance.LogDebug("Request End for : " + request.SmsLogID + "   sms id  :" + request.SmsID);
                }
                else
                {
                    response = Request.CreateErrorResponse(HttpStatusCode.NotFound, "No detail found  for  sms id  : " + request.SmsID + ".");
                }
            }
            catch (Exception ex)
            {
                LoggerFactory.LoggerInstance.LogException(ex);
                response = Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "Error occured while getting sms id " + request.SmsID + ".");
            }
            return(response);
        }
예제 #2
0
        public virtual SP_sms_logs_SelectOneResult GetSMSLogsDetailById(clssmslogs obj)
        {
            SP_sms_logs_SelectOneResult objResult = new SP_sms_logs_SelectOneResult();

            try
            {
                objResult = (SP_sms_logs_SelectOneResult)db.SP_sms_logs_SelectOne(obj.SmsLogID);
            }
            catch (Exception ex)
            {
                LoggerFactory.LoggerInstance.LogException(ex);
                throw ex;
            }
            return(objResult);
        }
예제 #3
0
        public virtual int DeleteSMSLogsMaster(clssmslogs obj)
        {
            int result = 0;

            try
            {
                result = (int)db.SP_sms_logs_Delete(obj.SmsLogID);
            }
            catch (Exception ex)
            {
                LoggerFactory.LoggerInstance.LogException(ex);
                throw ex;
            }

            return(result);
        }
예제 #4
0
        public virtual int UpdateSMSLogsMaster(clssmslogs obj)
        {
            int result = 0;

            try
            {
                result = (int)db.SP_sms_logs_Update(obj.SmsLogID, obj.UserID, obj.InstanceID, obj.CustomerID, obj.SmsID, obj.TemplateName, obj.CountryCode, obj.FromNumber, obj.ToNumber, obj.Details, obj.Status, obj.CreatedDate);
            }
            catch (Exception ex)
            {
                LoggerFactory.LoggerInstance.LogException(ex);
                throw ex;
            }

            return(result);
        }
예제 #5
0
        public virtual long InsertSMSLogsMaster(clssmslogs obj)
        {
            long result   = 0;
            long?resultID = 0;

            try
            {
                result = (long)db.SP_sms_logs_Insert(ref resultID, obj.UserID, obj.InstanceID, obj.CustomerID, obj.SmsID, obj.TemplateName, obj.CountryCode, obj.FromNumber, obj.ToNumber, obj.Details, obj.Status, obj.CreatedDate);
            }
            catch (Exception ex)
            {
                LoggerFactory.LoggerInstance.LogException(ex);
                throw ex;
            }

            return(result);
        }