public bool AddUpdateProcessor(ProcessorLookupModel entity)
 {
     return new DataAccess.DataAccess().ExecuteNonQuery("avz_Proc_spAddUpdateProcessor", new
     {
         ProcessorId = entity.ProcessorId,
         Name = entity.Name,
         ProcessorCode = entity.ProcessorCode,
         Description = entity.Description,
         IsActive = entity.IsActive              
     });
 }
 // bool CheckProcessorExist(ProcessorLookupModel entity);
 public bool CheckProcessorExist(ProcessorLookupModel entity)  
 {
     int result = new DataAccess.DataAccess().ExecuteScalar<int>("avz_proc_CheckprocessorNameExist", new { Name = entity.Name, ProcessorId = entity.ProcessorId });
     if (result > 0)
     {
         return true;
     }
     else
     {
         return false;
     }
 }
        public HttpResponseMessage CheckProcessorExist(ProcessorLookupModel processor)
        {
            bool response;
            using (ProcessorTier usertier = new ProcessorTier())
            {
                response = usertier.CheckProcessorExist(processor);
                if (response)
                { return this.Request.CreateResponse(HttpStatusCode.OK, response); }
                else
                    return this.Request.CreateResponse(HttpStatusCode.Accepted, response);

            }
        }
 public HttpResponseMessage AddUpdateProcessor(ProcessorLookupModel obj)
 {
     using (ProcessorTier mt = new ProcessorTier())
     {
         try
         {
             return this.Request.CreateResponse(HttpStatusCode.OK, mt.AddUpdateProcessor(obj));
         }
         catch (Exception ex)
         {
             return this.Request.CreateResponse(HttpStatusCode.BadRequest, ex.Message);
         }
     }
 }
Beispiel #5
0
 public bool AddUpdateProcessor(ProcessorLookupModel entity)
 {
     return processorRepository.AddUpdateProcessor(entity);
 }
Beispiel #6
0
 public bool CheckProcessorExist(ProcessorLookupModel entity)
 {
     return processorRepository.CheckProcessorExist(entity);
 }