示例#1
0
    private bool AllowReassignProspect()
    {
        bool EnableMarketing = false;

        if (ddlRole.SelectedItem.Text != "Loan Officer")
        {
            return(EnableMarketing);
        }

        try
        {
            LPWeb.BLL.Company_General cg = new LPWeb.BLL.Company_General();
            EnableMarketing = cg.CheckMarketingEnabled();
        }
        catch
        { }

        return(EnableMarketing);
    }
示例#2
0
    private bool AllowReassignProspect()
    {
        bool EnableMarketing = false;

        if (hfLoanOfficer.Value.Length == 0 || ddlLoanOfficer.SelectedItem.Text == hfLoanOfficer.Value)
        {
            return(EnableMarketing);
        }

        try
        {
            LPWeb.BLL.Company_General cg = new LPWeb.BLL.Company_General();
            EnableMarketing = cg.CheckMarketingEnabled();
        }
        catch
        { }

        return(EnableMarketing);
    }
示例#3
0
    private bool AllowReassignProspect()
    {
        bool EnableMarketing = false;

        if (oldUserID == 0 || Convert.ToInt32(ddlUsers.SelectedItem.Value) == oldUserID)
        {
            return(EnableMarketing);
        }

        try
        {
            LPWeb.BLL.Company_General cg = new LPWeb.BLL.Company_General();
            EnableMarketing = cg.CheckMarketingEnabled();
        }
        catch
        { }

        return(EnableMarketing);
    }
示例#4
0
    /// <summary>
    /// 同步按钮
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSync_Click(object sender, EventArgs e)
    {
        try
        {
            // 请大家不要使用 System.Transactions.TransactionScope, 它导致Service崩溃.
            //using (System.Transactions.TransactionScope ts = new System.Transactions.TransactionScope())
            //{
            LPWeb.BLL.Company_General   bllCG      = new LPWeb.BLL.Company_General();
            LPWeb.Model.Company_General modGeneral = new LPWeb.Model.Company_General();

            modGeneral = bllCG.GetModel();

            modGeneral.StartMarketingSync = true;

            bllCG.Update(modGeneral);

            ServiceManager sm = new ServiceManager();

            using (LP2ServiceClient client = sm.StartServiceClient())
            {
                string err = "";
                if (!client.SyncMarketingData(ref err))
                {
                    PageCommon.AlertMsg(this, err);
                    return;
                }

                //ts.Complete();
            }
            //}

            PageCommon.WriteJsEnd(this, "Sync Marketing Info successfully.", PageCommon.Js_RefreshSelf);
        }
        catch (Exception ex)
        {
            PageCommon.AlertMsg(this, ex.Message);
            return;
        }
    }