/// <summary>
        /// This Method is used to Delete data into tbl_MemberShip table
        /// </summary>
        /// <param name="objMemberShip">ID and Action</param>
        /// <returns>1 for success and -1 for fail</returns>

        public string DeleteMemberShip(PropAssociateMembership objMemberShip, string userName)
        {
            if (userName != null && userName != "")
            {
                SqlCommand cmd = new SqlCommand("proc_AssociateMembership", objCon.Con);
                cmd.CommandType = CommandType.StoredProcedure;
                objCon.Con.Open();
                try
                {
                    cmd.Parameters.AddWithValue("@ID", objMemberShip.ID);
                    cmd.Parameters.AddWithValue("@Action", "Delete");
                    return(cmd.ExecuteNonQuery().ToString());
                }
                catch (Exception showError)
                {
                    throw showError;
                }
                finally
                {
                    cmd.Dispose();
                    objCon.Con.Close();
                    objCon.Con.Dispose();
                }
            }
            else
            {
                return("Not Valid");
            }
        }
Esempio n. 2
0
        /// <summary>
        /// This Method is used to Delete data
        /// </summary>
        /// <param name="objCategory">ID and Action</param>
        /// <returns>1 for success and -1 for fail</returns>

        public string RecordDelete(PropAssociateMembership objProperty, string UserName)
        {
            DllAssociateSubscription objDal = new DllAssociateSubscription();

            try
            {
                return(objDal.DeleteMemberShip(objProperty, UserName));
            }
            catch (Exception info)
            {
                throw info;
            }
            finally
            {
                objDal = null;
            }
        }
Esempio n. 3
0
        public string InsertSubscription(int SubscriptionID)
        {
            string str = string.Empty;

            if (Session["associate"].ToString() != "" || Session["associate"].ToString() != null)
            {
                PropAssociateMembership proSubscription = new PropAssociateMembership();
                proSubscription.associateID    = Convert.ToInt16(Session["associate"].ToString());
                proSubscription.subscriptionID = SubscriptionID;
                BllAssociateSubscription objsubscription = new BllAssociateSubscription();
                str = objsubscription.RecordInsert(proSubscription, Session["associate"].ToString());

                return(str);
            }
            else
            {
                return("Error in Authentication");
            }
        }