Beispiel #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     SetCustomerDetails((int)IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole.OrganizationRoleUserId);
     var marketingPartnerDal = new MarketingPartnerDAL();
     //TODO:It will nork since Affiliate is not working
     //SetMonetizedView(marketingPartnerDal.CheckMonetizedAdvocate((int)IoC.Resolve<ISessionContext>().UserSession.CurrentOrganizationRole.OrganizationRoleUserId));
 }
Beispiel #2
0
    public Int64 ChangeAffiliateApprovedStatus(Int32 AffiliateId, Int16 activate)
    {
        bool status = activate == 0 ? false : true;
        var  marketingPartnerDal = new MarketingPartnerDAL();

        marketingPartnerDal.ChangeAffiliateApprovedStatus(status, AffiliateId);
        return(1);
    }
Beispiel #3
0
    public string GetAffiliateUserCategory(Int64 affiliateUserId)
    {
        var marketParternerDal = new MarketingPartnerDAL();

        string strCategory = marketParternerDal.GetAffiliateUserCategory(affiliateUserId);

        return(strCategory);
    }
Beispiel #4
0
    /// <summary>
    /// Save button click Event
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void ibtnsave_Click(object sender, ImageClickEventArgs e)
    {
        long intCustomerId = IoC.Resolve <SessionContext>().UserSession.CurrentOrganizationRole.OrganizationRoleUserId;

        var marketingPartnerDal = new MarketingPartnerDAL();

        marketingPartnerDal.ChangeIsMonetizedAdvocateStatus((int)intCustomerId, true);
        Response.RedirectUser("WelcomeMonetize.aspx", true);
    }
Beispiel #5
0
    public string[] GetSimilarFranchisee(string prefixText, int count)
    {
        List <string> items = new List <string>();
        var           marketingPartnerDal = new MarketingPartnerDAL();

        Falcon.Entity.Franchisee.EFranchisee[] objFranchisee = marketingPartnerDal.SearchFranchisee(prefixText).ToArray();//service.SearchFranchisee(prefixText);
        foreach (Falcon.Entity.Franchisee.EFranchisee eFranchisee in objFranchisee)
        {
            items.Add(eFranchisee.Name + "[" + "ID:" + eFranchisee.FranchiseeID.ToString() + "]");
        }
        return(items.ToArray());
    }
Beispiel #6
0
    public string[] GetMatchingFranchisee(string prefixText, int count)
    {
        List <string> items = new List <string>();

        var marketParternerDal = new MarketingPartnerDAL();

        EFranchisee[] objFranchisee = marketParternerDal.SearchFranchisee(prefixText).ToArray();
        foreach (EFranchisee eFranchisee in objFranchisee)
        {
            items.Add(eFranchisee.Name + "[" + "ID:" + eFranchisee.FranchiseeID + "]");
        }
        return(items.ToArray());
    }
    /// <summary>
    /// Page Load Event
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        var marketingPartnerDal = new MarketingPartnerDAL();

        marketingPartnerDal.ChangeExpressToAdvancedAdvocate((int)IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole.OrganizationRoleUserId, true);
        var sbScript = new StringBuilder();

        sbScript.Append("<script language='JavaScript' type='text/javascript'>");
        sbScript.Append("alert('You will not be able to manage camapigns from now.');window.location='AffiliateDashboard.aspx'");  // <--- be very careful here, as single quote ( ' ) use in parameter

        sbScript.Append("</script>");
        ClientScript.RegisterStartupScript(typeof(Page), "@@@@MyCallBackAlertScript", sbScript.ToString());
    }
        private DataSet GetCategoryCustomer(string modestring, string strStartDate, string strEndDate)
        {
            var marketingPartnerDal = new MarketingPartnerDAL();

            switch (modestring)
            {
            case "Today":
                return(marketingPartnerDal.GetCategoryCustomer(0, strStartDate, strEndDate));

            case "Week":
                return(marketingPartnerDal.GetCategoryCustomer(1, strStartDate, strEndDate));

            case "Month":
                return(marketingPartnerDal.GetCategoryCustomer(2, strStartDate, strEndDate));

            case "All":
                return(marketingPartnerDal.GetCategoryCustomer(3, strStartDate, strEndDate));
            }
            return(null);
        }
Beispiel #9
0
        private DataSet GetCategoryAdvocateCustomer(string mode, Int64 intCategoryId, string strStartdate, string strEndDate, int pagenumber, int pagesize)
        {
            var marketingPartnerDal = new MarketingPartnerDAL();

            switch (mode)
            {
            case "Today":
                return(marketingPartnerDal.GetCategoryAdvocateCustomer(0, intCategoryId, strStartdate, strEndDate, pagenumber, pagesize));

            case "Week":
                return(marketingPartnerDal.GetCategoryAdvocateCustomer(1, intCategoryId, strStartdate, strEndDate, pagenumber, pagesize));

            case "Month":
                return(marketingPartnerDal.GetCategoryAdvocateCustomer(2, intCategoryId, strStartdate, strEndDate, pagenumber, pagesize));

            case "All":
                return(marketingPartnerDal.GetCategoryAdvocateCustomer(3, intCategoryId, strStartdate, strEndDate, pagenumber, pagesize));
            }
            return(null);
        }
Beispiel #10
0
    public String GetHPBannerForCustomer(Int64 intCustomerId, String strServerPath, String strServerImagePath, out string strassociatedphonenum)
    {
        string strHtmlString = string.Empty;

        strassociatedphonenum = string.Empty;
        var   marketingPartnerDal = new MarketingPartnerDAL();
        Int64 intCampaignid;
        Int64 intAdvocateid;

        try
        {
            EMarketingMaterial bannerForCustomer = marketingPartnerDal.GetHPBannerForCustomer(intCustomerId, out intCampaignid, out intAdvocateid, out strassociatedphonenum);
            if (bannerForCustomer.MarketingMaterialId > 0)
            {
                marketingPartnerDal.UpdateClickImpressionCount(bannerForCustomer.MarketingMaterialId, intCampaignid, 0);
                var    encryptionHelper = new EncryptionHelper();
                string authCode         = encryptionHelper.Encrypt("mid=" + bannerForCustomer.MarketingMaterialId.ToString() + "//CId=" + intCampaignid.ToString() + "//aId=" + intAdvocateid.ToString());


                string nameHyparent = "<span id='hyParent' name='hyParent' >";
                nameHyparent = nameHyparent + "<input name='hdAuthKey' id='hdAuthKey' type='hidden'  value='" + authCode + "' />";

                nameHyparent = nameHyparent + "<script type='text/javascript'>var AuthKey = '" + authCode + "';</script>";
                string hyStyleend = "</span>";
                if ((bannerForCustomer.LeadingInURL == "http://") || (bannerForCustomer.LeadingInURL == string.Empty))
                {
                    bannerForCustomer.LeadingInURL = IoC.Resolve <ISettings>().SiteUrl;
                }

                strHtmlString = strHtmlString + "<a href='#' onclick='window.open(\"" + strServerPath + "OnlineAdvertisment/imp.ashx?AuthKey=" + authCode + "&Type=Click&LeadingUrl=" + bannerForCustomer.LeadingInURL + "\")'>";
                strHtmlString = strHtmlString + "<img src='" + strServerImagePath + bannerForCustomer.ImagePath.Substring(bannerForCustomer.ImagePath.LastIndexOf("\\") + 1) + "'  border='0' alt='" + bannerForCustomer.Text + "' /></a>";

                strHtmlString = nameHyparent + strHtmlString + hyStyleend;
            }
            return(strHtmlString);
        }
        catch
        {
            return(string.Empty);
        }
    }
Beispiel #11
0
    private void SetAdvocateDetails(string startDate, string endDate)
    {
        var    marketingPartnerDal = new MarketingPartnerDAL();
        string advocateManagerData = marketingPartnerDal.GetAdvocateManagerData(startDate, endDate);

        spCampaignCount.InnerText          = string.Empty;
        spExpressAdvocateCount.InnerText   = "0";
        spAdvancedAdvocateCount.InnerText  = "0";
        spMarketingMaterialCount.InnerText = "0";
        spCommission.InnerText             = "0";

        if (!string.IsNullOrEmpty(advocateManagerData))
        {
            string[] advocateManager = advocateManagerData.Split(new char[] { ',' });
            spCampaignCount.InnerText          = advocateManager[0].Split(new char[] { '=' })[1];
            spExpressAdvocateCount.InnerText   = advocateManager[1].Split(new char[] { '=' })[1];
            spAdvancedAdvocateCount.InnerText  = advocateManager[2].Split(new char[] { '=' })[1];
            spMarketingMaterialCount.InnerText = advocateManager[3].Split(new char[] { '=' })[1];
            spCommission.InnerText             = advocateManager[4].Split(new char[] { '=' })[1];

            spTotalClient.InnerText = Convert.ToString(Convert.ToInt32(spExpressAdvocateCount.InnerText) + Convert.ToInt32(spAdvancedAdvocateCount.InnerText));
        }
    }
Beispiel #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Title = "Frequently Asked Question";
        Customer_CustomerMaster objMaster = (Customer_CustomerMaster)Master;

        objMaster.SetPageView("AdvocateDashBoard");

        if (IsPostBack)
        {
            return;
        }
        if (Session["LastLoginTime"] != null && Session["LastLoginTime"].ToString().Trim() != "")
        {
            spLastLogin.InnerHtml = "Your last login time: " + Convert.ToDateTime(Session["LastLoginTime"].ToString()).ToString("MMMM dd, yyyy, hh:mm tt");
        }
        else
        {
            divLastLogin.Visible = false;
        }

        var marketingPartnerDal = new MarketingPartnerDAL();

        uc1.AdvocateView = !marketingPartnerDal.CheckExpressAdvocate((int)IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole.OrganizationRoleUserId);;
    }
Beispiel #13
0
    public List <string> GetFranchiseeByPrefixText(string prefixText)
    {
        var marketingPartnerDal = new MarketingPartnerDAL();

        return(marketingPartnerDal.SearchFranchisee(prefixText).Select <EFranchisee, string>(eFranchisee => eFranchisee.Name + "[" + "ID:" + eFranchisee.FranchiseeID.ToString() + "]").ToList <string>());
    }