示例#1
0
    public Int64 SaveProspectCustomerData(string prospectCustomerId, string fieldName, string value)
    {
        OtherDAL otherDal = new OtherDAL();
        long     savedProspectCustomerId = otherDal.SaveProspectCustomerData(Convert.ToInt32(prospectCustomerId), fieldName, value);

        // If this is a new prospect customer, track this conversion.
        if (prospectCustomerId.Equals("0"))
        {
            long clickId = 0;

            HttpCookie clickIdCookie = Context.Request.Cookies["advertiserClick"];
            if (clickIdCookie != null)
            {
                long.TryParse(clickIdCookie.Value, out clickId);
            }

            // if there's a click ID, save which click caused the conversion to a prospective customer, and their prospect ID
            if (clickId > 0)
            {
                IClickConversionRepository ccr = new ClickConversionRepository();
                ccr.SaveProspectConversion(clickId, savedProspectCustomerId);
            }
        }

        return(savedProspectCustomerId);
    }