Ejemplo n.º 1
0
 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              
     });
 }
Ejemplo n.º 2
0
 // 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;
     }
 }
Ejemplo n.º 3
0
        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);

            }
        }
Ejemplo n.º 4
0
 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);
         }
     }
 }
Ejemplo n.º 5
0
 public bool AddUpdateProcessor(ProcessorLookupModel entity)
 {
     return processorRepository.AddUpdateProcessor(entity);
 }
Ejemplo n.º 6
0
 public bool CheckProcessorExist(ProcessorLookupModel entity)
 {
     return processorRepository.CheckProcessorExist(entity);
 }