public ActionResult Create(countrycode countrycode) { countrycodes.Insert(countrycode); countrycodes.Commit(); return(RedirectToAction("Index")); }
public ActionResult Edit(countrycode countrycode) { countrycodes.Update(countrycode); countrycodes.Commit(); return(RedirectToAction("Index")); }
// GET: /Edit/5 public ActionResult EditCountry(string id) { countrycode countrycode = countrycodes.GetById(id); if (countrycode == null) { return(HttpNotFound()); } return(View(countrycode)); }
// GET: /Delete/5 public ActionResult Delete(int id) { countrycode countrycode = countrycodes.GetById(id); if (countrycode == null) { return(HttpNotFound()); } return(View(countrycode)); }
public ActionResult EditCountry(countrycode countrycode) { var _country = countrycodes.GetById(countrycode.code); _country.code = countrycode.code; _country.name = countrycode.name; _country.lastUpdate = DateTime.Now; countrycodes.Update(_country); countrycodes.Commit(); return(RedirectToAction("Index")); }
public ActionResult CreateCountry(countrycode countrycode) { //validation check var code1 = countrycodes.GetAll().Where(s => s.code.ToUpper().Contains(countrycode.code.ToUpper())).ToList(); var name1 = countrycodes.GetAll().Where(s => s.name.ToUpper().Contains(countrycode.name.ToUpper())).ToList(); var _country = new countrycode(); _country.code = countrycode.code; _country.name = countrycode.name; _country.createDate = DateTime.Now; _country.lastUpdate = DateTime.Now; //code and name validation if (_country.code == null) { return(RedirectToAction("ErrorMessage")); } else if (_country.code.Trim().Length > 3) { return(RedirectToAction("ErrorMessage")); } else if (code1.Count() > 0) { return(RedirectToAction("ErrorMessage")); } else if (_country.name == null) { return(RedirectToAction("ErrorMessage")); } else if (_country.name.Trim().Length > 50) { return(RedirectToAction("ErrorMessage")); } else if (name1.Count() > 0) { return(RedirectToAction("ErrorMessage")); } countrycodes.Insert(_country); countrycodes.Commit(); return(RedirectToAction("Index")); }
// GET: /Create public ActionResult Create() { var countrycode = new countrycode(); return(View(countrycode)); }
public CommandRouter(dbi298845_prangersEntities database, countrycode countrycode) { _allCommand = new Dictionary <string, Command>(); _database = database; _countrycode = countrycode; }
public Importer(dbi298845_prangersEntities database, countrycode countrycode) { this.database = database; this.countrycode = countrycode; }
protected abstract Importer <T> CreateImporter(dbi298845_prangersEntities database, countrycode countrycode);
public PostalCodeImporter(dbi298845_prangersEntities database, countrycode countrycode) : base(database, countrycode) { }
public IngredientImporter(dbi298845_prangersEntities database, countrycode countrycode) : base(database, countrycode) { }
protected override Importer <store> CreateImporter(dbi298845_prangersEntities database, countrycode countrycode) { return(new StoreImporter(database, countrycode)); }
public ProductIngredientImport(dbi298845_prangersEntities database, countrycode countrycode) : base(database, countrycode) { this.productImporter = new ProductImporter(database, countrycode); }
public override void Initialize(dbi298845_prangersEntities database, countrycode countrycode) { _database = database; }
protected override Importer <postalcode> CreateImporter(dbi298845_prangersEntities database, countrycode countrycode) { return(new PostalCodeImporter(database, countrycode)); }
public abstract void Initialize(dbi298845_prangersEntities database, countrycode countrycode);
protected override Importer <product> CreateImporter(dbi298845_prangersEntities database, countrycode countrycode) { return(new ProductImporter(database, countrycode)); }
protected override Importer <bottom> CreateImporter(dbi298845_prangersEntities database, countrycode countrycode) { return(new BottomImporter(database, countrycode)); }
public BottomImporter(dbi298845_prangersEntities database, countrycode countrycode) : base(database, countrycode) { }
protected override Importer <ingredient> CreateImporter(dbi298845_prangersEntities database, countrycode countrycode) { return(new IngredientImporter(database, countrycode)); }
public override void Initialize(dbi298845_prangersEntities database, countrycode countrycode) { _importer = CreateImporter(database, countrycode); }