示例#1
0
        public void AddSystemCountryCode(SystemCountryCodePoco[] pocos)
        {
            EFGenericRepository <SystemCountryCodePoco> repo = new EFGenericRepository <SystemCountryCodePoco>(false);
            SystemCountryCodeLogic logic = new SystemCountryCodeLogic(repo);

            logic.Add(pocos);
        }
示例#2
0
        public override Task <Empty> CreateSystemCountryCode(SysCountryCodeArray request, ServerCallContext context)
        {
            var pocos = ProtoToPoco(request);

            _logic.Add(pocos.ToArray());
            return(new Task <Empty>(() => new Empty()));
        }
示例#3
0
        public void AddSystemCountryCode(SystemCountryCodePoco[] items)
        {
            var logic = new SystemCountryCodeLogic
                            (new EFGenericRepository <SystemCountryCodePoco>());

            logic.Add(items);
        }
示例#4
0
        public void AddSystemCountryCode(SystemCountryCodePoco[] items)
        {
            EFGenericRepository <SystemCountryCodePoco> SystemCountryCodeRepo = new EFGenericRepository <SystemCountryCodePoco>(false);
            var Logic = new SystemCountryCodeLogic(SystemCountryCodeRepo);

            Logic.Add(items);
        }
示例#5
0
        public void AddSystemCountryCode(SystemCountryCodePoco[] item)
        {
            EFGenericRepository <SystemCountryCodePoco> systemcountrycoderepo = new EFGenericRepository <SystemCountryCodePoco>(false);
            SystemCountryCodeLogic _systemcountrycodelogic = new SystemCountryCodeLogic(systemcountrycoderepo);

            _systemcountrycodelogic.Add(item);
        }
示例#6
0
        public void AddSystemCountryCode(SystemCountryCodePoco[] pocos)
        {
            ApplicantProfileRepository <SystemCountryCodePoco> repo = new ApplicantProfileRepository <SystemCountryCodePoco>(false);
            SystemCountryCodeLogic log = new SystemCountryCodeLogic(repo);

            log.Add(pocos);
        }
示例#7
0
        public ActionResult PostSystemCountryCode(
            [FromBody] SystemCountryCodePoco[] pocos)
        {
            _logic.Add(pocos);

            return(Ok());
        }
示例#8
0
 public IHttpActionResult PostSystemCountryCode(SystemCountryCodePoco[] countryCode)
 {
     if (countryCode == null)
     {
         return(NotFound());
     }
     _logic.Add(countryCode);
     return(Ok());
 }
示例#9
0
 public override Task <Empty> CreateSystemCountryCode(SystemCountryCodePayload request, ServerCallContext context)
 {
     SystemCountryCodePoco[] poco = { new SystemCountryCodePoco()
                                      {
                                          Code = request.Code,
                                          Name = request.Name
                                      } };
     _logic.Add(poco);
     return(new Task <Empty>(() => new Empty()));
 }
        public override Task <Empty> CreateSystemCountryCode(SystemCountryCodePayload request, ServerCallContext context)
        {
            SystemCountryCodePoco poco = new SystemCountryCodePoco()
            {
                Code = request.Code,
                Name = request.Name
            };

            _logic.Add(new SystemCountryCodePoco[] { poco });
            return(null);
        }
 public override Task <Empty> CreateSystemCountryCode(SystemCountryCodePayload request, ServerCallContext context)
 {
     SystemCountryCodePoco[] pocos = new SystemCountryCodePoco[1];
     foreach (var poco in pocos)
     {
         poco.Code = request.Code;
         poco.Name = request.Name;
     }
     _logic.Add(pocos);
     return(new Task <Empty>(() => new Empty()));
 }
        public override Task <Empty> CreateSystemCountryCode(SystemCountryCodePayload request, ServerCallContext context)
        {
            SystemCountryCodePoco[] pocos = new SystemCountryCodePoco[1];

            pocos[0].Code = request.Code;
            pocos[0].Name = request.Name;



            _logic.Add(pocos);
            return(new Task <Empty>(null));
        }
示例#13
0
 public IHttpActionResult PostSystemCountryCode([FromBody] SystemCountryCodePoco[] pocos)
 {
     try
     {
         _logic.Add(pocos);
         return(Ok());
     }
     catch (Exception e)
     {
         return(InternalServerError(e));
     }
 }
示例#14
0
 public ActionResult PostSystemCountryCode([FromBody] SystemCountryCodePoco[] pocos)
 {
     try
     {
         _logic.Add(pocos);
         return(Ok());
     }
     catch (AggregateException ae)
     {
         return(BadRequest(ae));
     }
     catch
     {
         return(StatusCode(500));
     }
 }
示例#15
0
 public void AddSystemCountryCode(SystemCountryCodePoco[] list)
 {
     try
     {
         SystemCountryCodeLogic logic = new SystemCountryCodeLogic(new EFGenericRepository <SystemCountryCodePoco>(false));
         logic.Add(list);
     }
     catch (AggregateException e)
     {
         List <ValidationException> exceptions = e.InnerExceptions.Cast <ValidationException>().ToList();
         foreach (ValidationException err in exceptions)
         {
             ValidationFault fault = new ValidationFault();
             fault.Result      = false;
             fault.Message     = "Country Create Problem";
             fault.Description = err.Message;
             FaultException <ValidationFault> fe = new FaultException <ValidationFault>(fault, new FaultReason(fault.Message));
             throw fe;
         }
     }
 }
示例#16
0
 public IHttpActionResult PostSystemCountryCode([FromBody] SystemCountryCodePoco[] pocos)
 {
     try
     {
         _logicObj.Add(pocos);
         return(this.Ok());
     }
     catch (AggregateException e)
     {
         IEnumerable <ValidationException> exceptions = e.InnerExceptions.Cast <ValidationException>();
         HttpResponseMessage response =
             this.Request.CreateErrorResponse(HttpStatusCode.BadRequest, exceptions.FirstOrDefault());
         throw new HttpResponseException(response);
     }
     catch (Exception e)
     {
         HttpResponseMessage response =
             this.Request.CreateErrorResponse(HttpStatusCode.BadRequest, e);
         throw new HttpResponseException(response);
     }
 }
示例#17
0
 public ActionResult PostSystemCountryCode(
     [FromBody] SystemCountryCodePoco[] systemcountrycodepoco)
 {
     _logic.Add(systemcountrycodepoco);
     return(Ok());
 }
示例#18
0
        // System CRUD for country code
        public void AddSystemCountryCode(SystemCountryCodePoco[] item)
        {
            var _logic = new SystemCountryCodeLogic(new EFGenericRepository <SystemCountryCodePoco>(false));

            _logic.Add(item);
        }
示例#19
0
        public void AddSystemCountryCode(SystemCountryCodePoco[] pocos)
        {
            var logic = new SystemCountryCodeLogic(new EFGenericRepository <SystemCountryCodePoco>(false));

            logic.Add(pocos);
        }
 public override Task <Empty> CreateSystemCountryCode(SystemCountryCodePayload request, ServerCallContext context)
 {
     _logic.Add(GetArray(request));
     return(new Task <Empty>(null));
 }
示例#21
0
 public void AddSystemCountryCode(SystemCountryCodePoco[] pocos)
 {
     _SystemCountryCodeLogic.Add(pocos);
 }
示例#22
0
 public IHttpActionResult PostSystemCountryCode([FromBody] SystemCountryCodePoco[] SystemCountryCodes)
 {
     _logic.Add(SystemCountryCodes);
     return(Ok());
 }
示例#23
0
 public void AddSystemCountryCodePoc(SystemCountryCodePoco[] items)
 {
     _logic.Add(items);
 }
示例#24
0
        // System Country Code
        public void AddSystemCountryCode(SystemCountryCodePoco[] items)
        {
            var reference = new SystemCountryCodeLogic(new EFGenericRepository <SystemCountryCodePoco>(false));

            reference.Add(items);
        }
示例#25
0
 public void AddSystemCountryCode(SystemCountryCodePoco[] item)
 {
     _sccLogic.Add(item);
 }