예제 #1
0
    private void BindData()
    {
        DataTable dt = Shove._Web.Cache.GetCacheAsDataTable(Shove._Web.WebConfig.GetAppSettingsString("SystemPreFix") + _Site.ID.ToString() + "MemberCommend_" + _User.ID.ToString());

        if (dt == null)
        {
            dt = new DAL.Views.V_Users().Open("", "CommenderID = " + _User.ID.ToString(), "[RegisterTime]");

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

                return;
            }

            Shove._Web.Cache.SetCache(Shove._Web.WebConfig.GetAppSettingsString("SystemPreFix") + _Site.ID.ToString() + "MemberCommend_" + _User.ID.ToString(), dt);
        }

        PF.DataGridBindData(g, dt, gPager);
    }
예제 #2
0
    private void BindData()
    {
        long id = Shove._Convert.StrToLong(hfID.Value, -1);

        if (id < 1)
        {
            Shove._Web.JavaScript.Alert(this.Page, "无效的参数列表.");

            return;
        }

        //获取数据
        string    cacheKey = "Cps_Administrator_CpsUsersList_" + id.ToString();
        DataTable dt       = Shove._Web.Cache.GetCacheAsDataTable(cacheKey);

        if (dt == null)
        {
            dt = new DAL.Views.V_Users().Open("", "CpsID = " + id.ToString(), "[RegisterTime]");
            Shove._Web.Cache.SetCache(cacheKey, dt, 100000);
        }

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

            return;
        }

        if (hfFilterExpress.Value != "")
        {
            DataView dv = new DataView(dt, hfFilterExpress.Value, "Name", DataViewRowState.OriginalRows);
            PF.DataGridBindData(g, dv, gPager);
        }
        else
        {
            PF.DataGridBindData(g, dt, gPager);
        }
    }
예제 #3
0
    private void BindData()
    {
        long id = Shove._Convert.StrToLong(hfID.Value, -1);
     
        if (id < 1)
        {
            Shove._Web.JavaScript.Alert(this.Page, "无效的参数列表.");

            return;
        }

        //获取数据
        string cacheKey = "Cps_Administrator_CpsUsersList_" + id.ToString();
        DataTable dt = Shove._Web.Cache.GetCacheAsDataTable(cacheKey);
        
        if (dt == null)
        {
            dt = new DAL.Views.V_Users().Open("", "CpsID = " + id.ToString(), "[RegisterTime]");
            Shove._Web.Cache.SetCache(cacheKey, dt, 100000);
        }         

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

            return;
        }

        if (hfFilterExpress.Value != "")
        {
            DataView dv = new DataView(dt, hfFilterExpress.Value, "Name", DataViewRowState.OriginalRows);
            PF.DataGridBindData(g, dv, gPager);
        }
        else
        {
            PF.DataGridBindData(g, dt, gPager);
        }
    }
예제 #4
0
    private void BindData()
    {
        long SiteID = Shove._Convert.StrToLong(Shove._Web.Utility.GetRequest("SiteID"), -1);
        long UserID = Shove._Convert.StrToLong(Shove._Web.Utility.GetRequest("id"), -1);

        if ((SiteID < 1) || (UserID < 1))
        {
            this.Response.Redirect("Users.aspx", true);

            return;
        }

        DataTable dt = new DAL.Views.V_Users().Open("", "SiteID = " + SiteID.ToString() + " and [ID] = " + UserID.ToString(), "");

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

            return;
        }

        if (dt.Rows.Count < 1)
        {
            PF.GoError(ErrorNumber.Unknow, "用户不存在", "Admin_UserDetail");

            return;
        }

        tbSiteID.Text = SiteID.ToString();
        tbUserID.Text = UserID.ToString();

        Users tu = new Users(SiteID)[SiteID, UserID];

        if (tu.ID < 1)
        {
            PF.GoError(ErrorNumber.Unknow, "用户不存在", "Admin_UserDetail");

            return;
        }

        tbUserName.Text  = tu.Name;
        tbUserEmail.Text = tu.Email;

        if (tu.UserType == 1)
        {
            rbUserType1.Checked = true;
        }
        else if (tu.UserType == 2)
        {
            rbUserType2.Checked = true;
        }
        else if (tu.UserType == 3)
        {
            rbUserType3.Checked = true;
        }

        tbUserRealityName.Text    = tu.RealityName;
        tbUserIDCardNumber.Text   = Shove._Convert.ToDBC(tu.IDCardNumber);
        ddlUserCity.City_id       = tu.CityID;
        tbUserTelephone.Text      = Shove._Convert.ToDBC(tu.Telephone);
        tbUserMobile.Text         = Shove._Convert.ToDBC(tu.Mobile);
        cbUserMobileValid.Checked = (tu.isMobileValided && (tu.Mobile != ""));
        tbUserEmail.Text          = tu.Email;
        tbUserQQ.Text             = Shove._Convert.ToDBC(tu.QQ);
        tbUserAddress.Text        = tu.Address;

        if (tu.Sex == "男")
        {
            rbUserSexM.Checked = true;
        }
        else if (tu.Sex == "女")
        {
            rbUserSexW.Checked = true;
        }

        tbUserBirthDay.Text        = tu.BirthDay.ToShortDateString();
        tbUserBankCardNumber.Text  = Shove._Convert.ToDBC(tu.BankCardNumber).Trim();
        tbScoringOfSelfBuy.Text    = tu.ScoringOfSelfBuy.ToString();
        tbScoringOfCommendBuy.Text = tu.ScoringOfCommendBuy.ToString();
        cbPrivacy.Checked          = tu.isPrivacy;
        cbisCanLogin.Checked       = tu.isCanLogin;


        string bankTypeName       = "";
        string bankName           = "";
        string bankCardNumber     = "";
        string bankInProvinceName = "";
        string bankInCityName     = "";
        string bankUserName       = "";
        int    returnValue        = -1;
        string returnDescription  = "";

        if (DAL.Procedures.P_GetUserBankDetail(SiteID, UserID, ref bankTypeName, ref bankName, ref bankCardNumber, ref bankInProvinceName, ref bankInCityName, ref bankUserName, ref returnValue, ref returnDescription) < 0)
        {
            Shove._Web.JavaScript.Alert(this.Page, returnDescription);
            return;
        }

        tbUserCradName.Text       = bankUserName;
        tbUserBankCardNumber.Text = bankCardNumber;

        hfBankInProvince.Value   = bankInProvinceName;
        hfBankInCity.Value       = bankInCityName;
        hfBankTypeName.Value     = bankTypeName;
        hfBankName.Value         = bankName;
        btnResetPassword.Enabled = (_User.Competences.IsOwnedCompetences(Competences.Administrator));
    }
예제 #5
0
    private void BindData()
    {
        long SiteID = Shove._Convert.StrToLong(Shove._Web.Utility.GetRequest("SiteID"), -1);
        long UserID = Shove._Convert.StrToLong(Shove._Web.Utility.GetRequest("id"), -1);

        if ((SiteID < 1) || (UserID < 1))
        {
            this.Response.Redirect("Users.aspx", true);

            return;
        }

        DataTable dt = new DAL.Views.V_Users().Open("", "SiteID = " + SiteID.ToString() + " and [ID] = " + UserID.ToString(), "");

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

            return;
        }

        if (dt.Rows.Count < 1)
        {
            PF.GoError(ErrorNumber.Unknow, "用户不存在", "Admin_UserDetail");

            return;
        }

        tbSiteID.Text = SiteID.ToString();
        tbUserID.Text = UserID.ToString();

        Users tu = new Users(SiteID)[SiteID, UserID];

        if (tu.ID < 1)
        {
            PF.GoError(ErrorNumber.Unknow, "用户不存在", "Admin_UserDetail");

            return;
        }

        tbUserName.Text = tu.Name;
        tbUserEmail.Text = tu.Email;

        if (tu.UserType == 1)
        {
            rbUserType1.Checked = true;
        }
        else if (tu.UserType == 2)
        {
            rbUserType2.Checked = true;
        }
        else if (tu.UserType == 3)
        {
            rbUserType3.Checked = true;
        }

        tbUserRealityName.Text = tu.RealityName;
        tbUserIDCardNumber.Text = Shove._Convert.ToDBC(tu.IDCardNumber);
        ddlUserCity.City_id = tu.CityID;
        tbUserTelephone.Text = Shove._Convert.ToDBC(tu.Telephone);
        tbUserMobile.Text = Shove._Convert.ToDBC(tu.Mobile);
        cbUserMobileValid.Checked = (tu.isMobileValided && (tu.Mobile != ""));
        tbUserEmail.Text = tu.Email;
        tbUserQQ.Text = Shove._Convert.ToDBC(tu.QQ);
        tbUserAddress.Text = tu.Address;

        if (tu.Sex == "男")
        {
            rbUserSexM.Checked = true;
        }
        else if (tu.Sex == "女")
        {
            rbUserSexW.Checked = true;
        }

        tbUserBirthDay.Text = tu.BirthDay.ToShortDateString();
        //Shove.ControlExt.SetDownListBoxTextFromValue(ddlUserBankType, tu.BankType.ToString());
        //tbUserBankName.Text = tu.BankName;
        tbUserBankCardNumber.Text = Shove._Convert.ToDBC(tu.BankCardNumber).Trim();
        tbScoringOfSelfBuy.Text = tu.ScoringOfSelfBuy.ToString();
        tbScoringOfCommendBuy.Text = tu.ScoringOfCommendBuy.ToString();
        cbPrivacy.Checked = tu.isPrivacy;
        cbisCanLogin.Checked = tu.isCanLogin;


        string bankTypeName = "";
        string bankName = "";
        string bankCardNumber = "";
        string bankInProvinceName = "";
        string bankInCityName = "";
        string bankUserName = "";
        int returnValue = -1;
        string returnDescription = "";

        if (DAL.Procedures.P_GetUserBankDetail(SiteID, UserID, ref bankTypeName, ref bankName, ref bankCardNumber, ref bankInProvinceName, ref bankInCityName, ref bankUserName, ref returnValue, ref returnDescription) < 0)
        {
            Shove._Web.JavaScript.Alert(this.Page, returnDescription);
            return;
        }

        tbUserCradName.Text = bankUserName;
        tbUserBankCardNumber.Text = bankCardNumber;

        hfBankInProvince.Value = bankInProvinceName;
        hfBankInCity.Value = bankInCityName;
        hfBankTypeName.Value = bankTypeName;
        hfBankName.Value = bankName;


        /*
            tbPromotionMemberBonusScale.Text = tu.PromotionMemberBonusScale.ToString();
            tbPromotionSiteBonusScale.Text = tu.PromotionSiteBonusScale.ToString();
    */
        btnResetPassword.Enabled = (_User.Competences.IsOwnedCompetences(Competences.Administrator));
    }
 private void BindData()
 {
     long siteid = _Convert.StrToLong(Shove._Web.Utility.GetRequest("SiteID"), -1L);
     long userID = _Convert.StrToLong(Shove._Web.Utility.GetRequest("id"), -1L);
     if ((siteid < 1L) || (userID < 1L))
     {
         base.Response.Redirect("Users.aspx", true);
     }
     else
     {
         DataTable table = new Views.V_Users().Open("", "SiteID = " + siteid.ToString() + " and [ID] = " + userID.ToString(), "");
         if (table == null)
         {
             PF.GoError(4, "数据库繁忙,请重试", "Admin_UserDetail");
         }
         else if (table.Rows.Count < 1)
         {
             PF.GoError(1, "用户不存在", "Admin_UserDetail");
         }
         else
         {
             this.tbSiteID.Text = siteid.ToString();
             this.tbUserID.Text = userID.ToString();
             Users users = new Users(siteid)[siteid, userID];
             if (users.ID < 1L)
             {
                 PF.GoError(1, "用户不存在", "Admin_UserDetail");
             }
             else
             {
                 this.tbUserName.Text = users.Name;
                 this.tbUserEmail.Text = users.Email;
                 if (users.UserType == 1)
                 {
                     this.rbUserType1.Checked = true;
                 }
                 else if (users.UserType == 2)
                 {
                     this.rbUserType2.Checked = true;
                 }
                 else if (users.UserType == 3)
                 {
                     this.rbUserType3.Checked = true;
                 }
                 this.tbUserRealityName.Text = users.RealityName;
                 this.tbUserIDCardNumber.Text = _Convert.ToDBC(users.IDCardNumber);
                 this.ddlUserCity.City_id = users.CityID;
                 this.tbUserTelephone.Text = _Convert.ToDBC(users.Telephone);
                 this.tbUserMobile.Text = _Convert.ToDBC(users.Mobile);
                 this.cbUserMobileValid.Checked = users.isMobileValided && (users.Mobile != "");
                 this.tbUserEmail.Text = users.Email;
                 this.tbUserQQ.Text = _Convert.ToDBC(users.QQ);
                 this.tbUserAddress.Text = users.Address;
                 if (users.Sex == "男")
                 {
                     this.rbUserSexM.Checked = true;
                 }
                 else if (users.Sex == "女")
                 {
                     this.rbUserSexW.Checked = true;
                 }
                 this.tbUserBirthDay.Text = users.BirthDay.ToShortDateString();
                 this.tbUserBankCardNumber.Text = _Convert.ToDBC(users.BankCardNumber).Trim();
                 this.tbScoringOfSelfBuy.Text = users.ScoringOfSelfBuy.ToString();
                 this.tbScoringOfCommendBuy.Text = users.ScoringOfCommendBuy.ToString();
                 this.cbPrivacy.Checked = users.isPrivacy;
                 this.cbisCanLogin.Checked = users.isCanLogin;
                 string bankTypeName = "";
                 string bankName = "";
                 string bankCardNumber = "";
                 string bankInProvinceName = "";
                 string bankInCityName = "";
                 string bankUserName = "";
                 int returnValue = -1;
                 string returnDescription = "";
                 if (Procedures.P_GetUserBankDetail(siteid, userID, ref bankTypeName, ref bankName, ref bankCardNumber, ref bankInProvinceName, ref bankInCityName, ref bankUserName, ref returnValue, ref returnDescription) < 0)
                 {
                     JavaScript.Alert(this.Page, returnDescription);
                 }
                 else
                 {
                     this.tbUserCradName.Text = bankUserName;
                     this.tbUserBankCardNumber.Text = bankCardNumber;
                     this.hfBankInProvince.Value = bankInProvinceName;
                     this.hfBankInCity.Value = bankInCityName;
                     this.hfBankTypeName.Value = bankTypeName;
                     this.hfBankName.Value = bankName;
                     this.btnResetPassword.Enabled = base._User.Competences.IsOwnedCompetences("Administrator");
                 }
             }
         }
     }
 }