예제 #1
0
        public ResponseService execute(string request)
        {
            TblRegion region = new TblRegion()
            {
                NombreRegion = request
            };

            _unitOfWork.RegionRepository.Insert(region);
            _unitOfWork.Save();

            return(CreateResponseService.execute(Constant.CODIGO_EXITO, Constant.TRANSACCION_EXITOSA, null));
        }
예제 #2
0
 public static List<TblRegion> GetDistrictListData(int countryId)
 {
     List<TblRegion> list = new List<TblRegion>();
     var jss = new JavaScriptSerializer();
     var dict = jss.Deserialize<dynamic>(BizDictionary.GetDistrictListJS(countryId));
     foreach (var itm in dict) {
         TblRegion tbl = new TblRegion();
         tbl.Id = itm["Id"];
         tbl.Description = itm["Description"];
         tbl.Name = itm["Name"];
         list.Add(tbl);
     }
     return list;
 }