/// <summary>
        /// Takes the generated campaign and saves it to the user's campaigns
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void BtnSave_Click(object sender, EventArgs e)
        {
            Campaign saveCampaign = (Campaign)Session["generatedCampaign"];

            CampaignDAO campaignDAO = new CampaignDAO();

            campaignDAO.UploadCampaign(saveCampaign);

            Response.Redirect("~/Users/Campaigns/SeeAllCampaigns.aspx?newCampaign=true");
        }
Exemplo n.º 2
0
        /// <summary>
        /// 取得行銷活動資訊
        /// </summary>
        /// <param name="campaignId">行銷活動代號</param>
        /// <returns></returns>
        public CampaignDO GetCampaign(string campaignId)
        {
            CampaignDO campaign = null;

            if (String.IsNullOrEmpty(campaignId))
            {
                throw new ArgumentNullException("campaignId");
            }

            campaign = new CampaignDAO().Get(campaignId);

            return(campaign);
        }
Exemplo n.º 3
0
        /// <summary> Retrieves Entity rows in a datatable which match the specified filter. It will always create a new connection to the database.</summary>
        /// <param name="selectFilter">A predicate or predicate expression which should be used as filter for the entities to retrieve.</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="relations">The set of relations to walk to construct to total query.</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>DataTable with the rows requested.</returns>
        public static DataTable GetMultiAsDataTable(IPredicate selectFilter, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relations, int pageNumber, int pageSize)
        {
            CampaignDAO dao = DAOFactory.CreateCampaignDAO();

            return(dao.GetMultiAsDataTable(maxNumberOfItemsToReturn, sortClauses, selectFilter, relations, pageNumber, pageSize));
        }