public static SelectList LoadBoundary(IBoundaryAppService _boundaryService)
        {
            var items = _boundaryService.All().ToList()
                        .Select(x => new { x.Id, x.BoundaryName }).ToList();

            //items.Insert(0, new { Id = "", BoundaryName = "---- Select ----" });
            return(new SelectList(items.OrderBy(x => x.BoundaryName), "Id", "BoundaryName"));
        }
 public ActionResult UpdateBoundary(Boundary boundaryInfo)
 {
     try
     {
         var boundary = _boundaryService.All().ToList().Where(x => x.Id == boundaryInfo.Id).FirstOrDefault();
         if (boundary != null)
         {
             boundary.BoundaryName = EncryptionDecryption.DH_PEncode(boundaryInfo.BoundaryName);
             _boundaryService.Update(boundary);
             _boundaryService.Save();
         }
         return(Json("1", JsonRequestBehavior.AllowGet));
     }
     catch (Exception)
     {
         return(Json("0", JsonRequestBehavior.AllowGet));
     }
 }