Пример #1
0
        public string retcardData1(int associateID, string inUserName)
        {
            DllPurchaseCategory hh = new DllPurchaseCategory();
            int x = hh.RetrieveCardByAssociateID(associateID, inUserName);

            if (x == 0)
            {
                SqlCommand cmd = new SqlCommand("proc_RetrieveCardDataByAssociateID", objCon.Con);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@AssociateId", associateID);
                SqlDataAdapter adpt = new SqlDataAdapter();
                DataSet        ds   = new DataSet();
                if (objCon.Con.State == ConnectionState.Open)
                {
                }
                else
                {
                    objCon.Con.Open();
                }
                cmd.Connection     = objCon.Con;
                adpt.SelectCommand = cmd;
                adpt.Fill(ds, "GtCardDetail");
                objCon.Con.Close();
                return(ds.GetXml());
            }
            else
            {
                return(null);
            }
        }
Пример #2
0
        public DataTable retcardData(int associateID, string inUserName)
        {
            DllPurchaseCategory hh = new DllPurchaseCategory();
            // hh.RetrieveCardByAssociateID(associateID).Wait();
            int x = hh.RetrieveCardByAssociateID(associateID, inUserName);

            if (x == 0)
            {
                SqlCommand cmd = new SqlCommand("proc_RetrieveCardDataByAssociateID", objCon.Con);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@AssociateId", associateID);
                if (objCon.Con.State == ConnectionState.Open)
                {
                }
                else
                {
                    objCon.Con.Open();
                }
                SqlDataReader dr = cmd.ExecuteReader();
                DataTable     dt = new DataTable();
                dt.Load(dr);
                objCon.Con.Close();
                return(dt);
            }
            else
            {
                return(null);
            }
        }
Пример #3
0
        public string CardExistsOrNot(string associateID)
        {
            DllPurchaseCategory objDal = new DllPurchaseCategory();

            try
            {
                return(objDal.AssociateCardExists(associateID));
            }
            catch (Exception info)
            {
                throw info;
            }
            finally
            {
                objDal = null;
            }
        }
Пример #4
0
        public string InsertRecord(object CategoryID, object subCategoryID, int PaymentPlan, int associateID, object Categoryamount, object zipcodeID, string Couponcode, int Discount, int Duration)
        {
            DllPurchaseCategory objDal = new DllPurchaseCategory();

            try
            {
                return(objDal.InsertD(CategoryID, subCategoryID, PaymentPlan, associateID, Categoryamount, zipcodeID, Couponcode, Discount, Duration));
            }
            catch (Exception info)
            {
                throw info;
            }
            finally
            {
                objDal = null;
            }
        }
Пример #5
0
        public string UnFeaturedAd(object AdvertisementID)
        {
            DllPurchaseCategory objDal = new DllPurchaseCategory();

            try
            {
                return(objDal.UnFeaturedFeaturedAdvD(AdvertisementID));
            }
            catch (Exception info)
            {
                throw info;
            }
            finally
            {
                objDal = null;
            }
        }
Пример #6
0
        public string SetFeaturedAd(object AdvertisementID, int PaymentPlan, int AssociateID)
        {
            DllPurchaseCategory objDal = new DllPurchaseCategory();

            try
            {
                return(objDal.SetFeaturedAdvD(AdvertisementID, PaymentPlan, AssociateID));
            }
            catch (Exception info)
            {
                throw info;
            }
            finally
            {
                objDal = null;
            }
        }
Пример #7
0
        public string LoadCardData(int associateID, string amount, string inUserName, string Description)
        {
            DllPurchaseCategory objDal = new DllPurchaseCategory();

            try
            {
                return(objDal.LoadCardData(associateID, amount, inUserName, Description));
            }
            catch (Exception info)
            {
                throw info;
            }
            finally
            {
                objDal = null;
            }
        }
Пример #8
0
        public string CountAssociateAdvertisements(string associateID)
        {
            DllPurchaseCategory objDal = new DllPurchaseCategory();

            try
            {
                return(objDal.CountAssociateAdvertisements(associateID));
            }
            catch (Exception info)
            {
                throw info;
            }
            finally
            {
                objDal = null;
            }
        }
Пример #9
0
        public string PostAdvertisementPrice(string associateID, int zipCode, int subCategoryID)
        {
            DllPurchaseCategory objDal = new DllPurchaseCategory();

            try
            {
                return(objDal.PostAdvertisementPrice(associateID, zipCode, subCategoryID));
            }
            catch (Exception info)
            {
                throw info;
            }
            finally
            {
                objDal = null;
            }
        }