Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            CpsID = Shove._Convert.StrToLong(Shove._Web.Utility.GetRequest("id"), -1);

            if (CpsID < 1)
            {
                PF.GoError(ErrorNumber.Unknow, "参数错误", this.GetType().BaseType.FullName);

                return;
            }

            DataTable dt = new DAL.Views.V_Cps().Open("", "ID=" + CpsID.ToString() + " and ParentID=" + _User.cps.ID.ToString(), "");

            if (dt == null)
            {
                PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName);

                return;
            }

            if (dt.Rows.Count == 0)
            {
                PF.GoError(ErrorNumber.Unknow, "参数错误", this.GetType().BaseType.FullName);

                return;
            }

            DataRow dr = dt.Rows[0];

            spanLinkUrl.InnerHtml = Shove._Web.Utility.GetUrl() + "/Default.aspx?cpsid=" + CpsID.ToString();
            tdRealyName.InnerHtml = dr["RealityName"].ToString();
            tdUserName.InnerHtml  = dr["UserName"].ToString();
            tbUrlName.Text        = dr["Name"].ToString();
            tbUrl.Text            = dr["Url"].ToString();
            tbContactPerson.Text  = dr["ContactPerson"].ToString();
            tbPhone.Text          = dr["Telephone"].ToString();
            tbMobile.Text         = dr["Mobile"].ToString();
            tbQQNum.Text          = dr["QQ"].ToString();
            tbEmail.Text          = dr["Email"].ToString();

            lbUserName.InnerHtml = _User.Name + ",你好!";
            if (_User.cps.Type == 2)
            {
                lbUserType.InnerHtml  = "代理商";
                trPromoterCPS.Visible = false;
                trPromoter.Visible    = true;
            }
        }
    }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            CpsID = Shove._Convert.StrToLong(Shove._Web.Utility.GetRequest("id"), -1);

            if (CpsID < 1)
            {
                PF.GoError(ErrorNumber.Unknow, "参数错误", this.GetType().BaseType.FullName);

                return;
            }

            DataTable dt = new DAL.Views.V_Cps().Open("", "ID=" + CpsID.ToString() + " and ParentID=" + _User.cps.ID.ToString(), "");

            if (dt == null)
            {
                PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName);

                return;
            }

            if (dt.Rows.Count == 0)
            {
                PF.GoError(ErrorNumber.Unknow, "参数错误", this.GetType().BaseType.FullName);

                return;
            }

            DataRow dr = dt.Rows[0];

            spanLinkUrl.InnerHtml = Shove._Web.Utility.GetUrl() + "/Default.aspx?cpsid=" + CpsID.ToString();
            tdRealyName.InnerHtml = dr["RealityName"].ToString();
            tdUserName.InnerHtml = dr["UserName"].ToString();
            tbUrlName.Text = dr["Name"].ToString();
            tbUrl.Text = dr["Url"].ToString();
            tbContactPerson.Text = dr["ContactPerson"].ToString();
            tbPhone.Text = dr["Telephone"].ToString();
            tbMobile.Text = dr["Mobile"].ToString();
            tbQQNum.Text = dr["QQ"].ToString();
            tbEmail.Text = dr["Email"].ToString();
        }
    }