public static int Edit(StoreMarktingInfo info) { StoreMarktingDao storeMarktingDao = new StoreMarktingDao(); if (!storeMarktingDao.TypeValidate(info.Id, info.MarktingType)) { return(-1); } info.RedirectTo = info.RedirectUrl; return(storeMarktingDao.Update(info, null) ? 1 : 2); }
public static int AddInfo(StoreMarktingInfo info) { StoreMarktingDao storeMarktingDao = new StoreMarktingDao(); if (!storeMarktingDao.TypeValidate(info.Id, info.MarktingType)) { return(-1); } info.DisplaySequence = storeMarktingDao.GetMaxDisplaySequence <StoreMarktingInfo>(); info.RedirectTo = info.RedirectUrl; return((storeMarktingDao.Add(info, null) > 0) ? 1 : 2); }