Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["ContactID"] != null) // 如果有FileID
        {
            string sContactID = Request.QueryString["ContactID"];

            if (PageCommon.IsID(sContactID) == false)
            {
                //PageCommon.WriteJsEnd(this, sErrorMsg, "window.location.href='" + sReturnPage + "'");
            }
            try
            {
                CurrentContactID = Convert.ToInt32(sContactID);
            }
            catch
            {
                CurrentContactID = 0;
            }
        }

        if (CurrentContactID == 0)
        {
            return;
        }

        hfdContactID.Value = CurrentContactID.ToString();

        if (!IsPostBack)
        {
            BindGrid(1);
        }
    }
Exemplo n.º 2
0
    /// <summary>
    /// Query Condition
    /// </summary>
    /// <returns></returns>
    private string GenOrgQueryCondition()
    {
        string strWhere = " Contactid='" + CurrentContactID.ToString() + "' AND Status='Prospect'";


        if (this.ddlActiveLeads.SelectedIndex == 0)
        {
            strWhere += " AND ProspectLoanStatus='Active'";
        }
        else if (this.ddlActiveLeads.SelectedIndex == 1)
        {
        }
        else if (this.ddlActiveLeads.SelectedIndex == 2)
        {
            strWhere += " AND ProspectLoanStatus<>'Active'";
        }

        return(strWhere);
    }
Exemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.Url != null)
        {
            FromURL = Request.Url.ToString();
        }

        //是否有Create权限
        CurrentUser     = new LoginUser();
        sHasCreateRight = CurrentUser.userRole.Loans.ToString().IndexOf('A') > -1 ? "1" : "0"; //Create

        if (Request.QueryString["ContactID"] != null)                                          // 如果有FileID
        {
            string sContactID = Request.QueryString["ContactID"];

            if (PageCommon.IsID(sContactID) == false)
            {
                //PageCommon.WriteJsEnd(this, sErrorMsg, "window.location.href='" + sReturnPage + "'");
            }
            try
            {
                CurrentContactID = Convert.ToInt32(sContactID);
            }
            catch
            {
                CurrentContactID = 0;
            }
        }

        if (CurrentContactID == 0)
        {
            return;
        }

        hfdContactID.Value = CurrentContactID.ToString();

        if (!IsPostBack)
        {
            BindGrid(1);
        }
    }
Exemplo n.º 4
0
    private void BindGrid(int pageIndex)
    {
        try
        {
            int     pageSize    = AspNetPager1.PageSize;
            int     recordCount = 0;
            DataSet ds          = loan.GetPartnerContactActiveLoans(pageSize, pageIndex, " Contactid=" + CurrentContactID.ToString(), out recordCount, OrderName, OrderType);

            AspNetPager1.RecordCount      = recordCount;
            AspNetPager1.CurrentPageIndex = pageIndex;
            AspNetPager1.PageSize         = pageSize;

            gvLoans.DataSource = ds;
            gvLoans.DataBind();
        }
        catch
        { }
    }