protected override void LazySet() { base.LazySet(); if (PersistenceState == PersistenceState.NewAndChanged || PersistenceState == PersistenceState.LoadedAndChanged) { if ((object)InnerData == (object)OriginalData) { OriginalData = new SpecialOfferData(InnerData); } } }
public SpecialOfferData(SpecialOfferData data) { Description = data.Description; DiscountPct = data.DiscountPct; Type = data.Type; Category = data.Category; StartDate = data.StartDate; EndDate = data.EndDate; MinQty = data.MinQty; MaxQty = data.MaxQty; rowguid = data.rowguid; ModifiedDate = data.ModifiedDate; Uid = data.Uid; }
public int AddSpecialOffer(SpecialOffer specialoffer) { SpecialOfferData data = new SpecialOfferData(); int id = 0; try { id = data.AddSpecialOffer(specialoffer); } catch (Exception ex) { log.Write(ex.Message, "AddSpecialOffer"); throw (ex); } finally { data = null; } return(id); }
public SpecialOfferCollection GetSpecialOffersCollection(string where, string orderBy) { SpecialOfferData data = new SpecialOfferData(); SpecialOfferCollection col = new SpecialOfferCollection(); try { col = data.GetAllSpecialOffersDynamicCollection(where, orderBy); } catch (Exception ex) { log.Write(ex.Message, "GetSpecialOffersCollection"); throw (ex); } finally { data = null; } return(col); }
public DataSet GetSpecialOffersDataSet(string where, string orderBy) { SpecialOfferData data = new SpecialOfferData(); DataSet ds = new DataSet(); try { ds = data.GetAllSpecialOffersDynamicDataSet(where, orderBy); } catch (Exception ex) { log.Write(ex.Message, "GetSpecialOffersDataSet"); throw (ex); } finally { data = null; } return(ds); }
public SpecialOfferCollection GetAllSpecialOffersCollection() { SpecialOfferData data = new SpecialOfferData(); SpecialOfferCollection col = new SpecialOfferCollection(); try { col = data.GetAllSpecialOffersCollection(); } catch (Exception ex) { log.Write(ex.Message, "GetAllSpecialOffersCollection"); throw (ex); } finally { data = null; } return(col); }
public SpecialOffer GetSpecialOffers(int specialOfferID) { SpecialOfferData data = new SpecialOfferData(); SpecialOffer so = new SpecialOffer(); try { so = data.GetSpecialOffer(specialOfferID); } catch (Exception ex) { log.Write(ex.Message, "GetSpecialOffers"); throw (ex); } finally { data = null; } return(so); }
public bool UpdateSpecialOffer(SpecialOffer specialoffer) { SpecialOfferData data = new SpecialOfferData(); bool ret = false; try { ret = data.UpdateSpecialOffer(specialoffer); } catch (Exception ex) { log.Write(ex.Message, "UpdateSpecialOffer"); throw (ex); } finally { data = null; } return(ret); }
public bool RemoveSpecialOffer(int specialofferID) { SpecialOfferData data = new SpecialOfferData(); bool ret = false; try { ret = data.DeleteSpecialOffer(specialofferID); } catch (Exception ex) { log.Write(ex.Message, "RemoveSpecialOffer"); throw (ex); } finally { data = null; } return(ret); }