Пример #1
0
 protected override void LazySet()
 {
     base.LazySet();
     if (PersistenceState == PersistenceState.NewAndChanged || PersistenceState == PersistenceState.LoadedAndChanged)
     {
         if ((object)InnerData == (object)OriginalData)
         {
             OriginalData = new SpecialOfferData(InnerData);
         }
     }
 }
Пример #2
0
 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;
 }
Пример #3
0
        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);
        }
Пример #4
0
        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);
        }
Пример #5
0
        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);
        }
Пример #6
0
        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);
        }
Пример #7
0
        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);
        }
Пример #8
0
        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);
        }
Пример #9
0
        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);
        }