public ActionResult PartnersCreate(PartnersModel model) { int partnerId = model.Id; PartnersRecord rec = new PartnersRecord(); rec.Id = model.Id; rec.Latitude = model.Latitude; rec.Longtitude = model.Longtitude; rec.Name = model.Name; rec.PostCode = model.PostCode; rec.Telephone = model.Telephone; rec.Title = model.Title; rec.Address = model.Address; rec.City = model.City; rec.Description = model.Description; rec.Email = model.Email; if (rec.Id == 0) { _pService.InsertPartnerRecord(rec); } else { _pService.UpdatePartnerRecord(rec); } //_pService.SetSetting(string.Format("ShippingRateComputationMethod.FixedRate.Rate.ShippingMethodId{0}", shippingMethodId), rate); return(new NullJsonResult()); }
public ActionResult PartnersDelete(PartnersModel model) { PartnersRecord rec = new PartnersRecord(); rec.Id = model.Id; _pService.DeletePartner(rec); //_pService.SetSetting(string.Format("ShippingRateComputationMethod.FixedRate.Rate.ShippingMethodId{0}", shippingMethodId), rate); return(new NullJsonResult()); }
private static PartnersModel getPartnerDetails(PartnersRecord c) { return(new PartnersModel { Id = c.Id, Name = c.Name, Title = c.Description, Email = c.Email, Description = c.Description, Telephone = c.Telephone, PostCode = c.PostCode, Address = c.Address, City = c.City, Latitude = c.Latitude, Longtitude = c.Longtitude }); }
public virtual void UpdatePartnerRecord(PartnersRecord record) { _pRepository.Update(record); _cacheManager.RemoveByPattern(PARTNER_PATTERN_KEY); }
public virtual void DeletePartner(PartnersRecord record) { IEnumerable <PartnersRecord> partners = GetAll().Where(p => p.Id == record.Id); RepoDelete(partners); }