public JsonResult AjaxInsertCountry(string countryname,string countrycode)
 {
     Country c = new Country();
     c.CountryName = countryname;
     c.CountryCode = countrycode;
     bool result = CountryBml.Insert(c);
     return Json(result, JsonRequestBehavior.AllowGet);
 }
Esempio n. 2
0
 public static bool Delete(Country country)
 {
     using (FotografPaketiEntities db = new FotografPaketiEntities())
     {
         try
         {
             db.Entry(country).State = System.Data.Entity.EntityState.Deleted;
             db.SaveChanges();
             return true;
         }
         catch (Exception ex)
         {
             return false;
             throw;
         }
     }
 }
Esempio n. 3
0
 public static bool Insert(Country country)
 {
     using (FotografPaketiEntities db = new FotografPaketiEntities())
     {
         try
         {
             country.Status = false;
             db.Country.Add(country);
             db.SaveChanges();
             return true;
         }
         catch (Exception ex)
         {
             return false;
             throw;
         }
     }
 }