Пример #1
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(AccountInfoModel model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update AccountInfo set ");

            strSql.Append(" QQMobile = @QQMobile , ");
            strSql.Append(" Email = @Email , ");
            strSql.Append(" LevelTwoPwd = @LevelTwoPwd , ");
            strSql.Append(" PropertyPwd = @PropertyPwd , ");
            strSql.Append(" SecretCardBind = @SecretCardBind , ");
            strSql.Append(" SecretCardNo = @SecretCardNo , ");
            strSql.Append(" SecretCardImgUrl = @SecretCardImgUrl , ");
            strSql.Append(" IdentityAuth = @IdentityAuth , ");
            strSql.Append(" IdentityCardAUrl = @IdentityCardAUrl , ");
            strSql.Append(" IdentityCardBUrl = @IdentityCardBUrl , ");
            strSql.Append(" UserID = @UserID , ");
            strSql.Append(" OrderStatus = @OrderStatus , ");
            strSql.Append(" SubmitTime = @SubmitTime , ");
            strSql.Append(" GameName = @GameName , ");
            strSql.Append(" GameArea = @GameArea , ");
            strSql.Append(" ServerName = @ServerName , ");
            strSql.Append(" GameAccount = @GameAccount , ");
            strSql.Append(" GamePassword = @GamePassword , ");
            strSql.Append(" AccountRoleName = @AccountRoleName , ");
            strSql.Append(" IdCardNo = @IdCardNo  ");
            strSql.Append(" where ID=@ID ");

            SqlParameter[] parameters = {
                        new SqlParameter("@ID", SqlDbType.Int,4) ,
                        new SqlParameter("@QQMobile", SqlDbType.VarChar,255) ,
                        new SqlParameter("@Email", SqlDbType.VarChar,255) ,
                        new SqlParameter("@LevelTwoPwd", SqlDbType.VarChar,255) ,
                        new SqlParameter("@PropertyPwd", SqlDbType.NChar,255) ,
                        new SqlParameter("@SecretCardBind", SqlDbType.Int,4) ,
                        new SqlParameter("@SecretCardNo", SqlDbType.VarChar,255) ,
                        new SqlParameter("@SecretCardImgUrl", SqlDbType.VarChar,255) ,
                        new SqlParameter("@IdentityAuth", SqlDbType.Int,4) ,
                        new SqlParameter("@IdentityCardAUrl", SqlDbType.NVarChar,255) ,
                        new SqlParameter("@IdentityCardBUrl", SqlDbType.NVarChar,255) ,
                        new SqlParameter("@UserID", SqlDbType.Int,4) ,
                        new SqlParameter("@OrderStatus", SqlDbType.Int,4) ,
                        new SqlParameter("@SubmitTime", SqlDbType.DateTime) ,
                        new SqlParameter("@GameName", SqlDbType.NChar,255) ,
                        new SqlParameter("@GameArea", SqlDbType.NChar,255) ,
                        new SqlParameter("@ServerName", SqlDbType.NChar,255) ,
                        new SqlParameter("@GameAccount", SqlDbType.NChar,255) ,
                        new SqlParameter("@GamePassword", SqlDbType.NChar,255) ,
                        new SqlParameter("@AccountRoleName", SqlDbType.NChar,255) ,
                        new SqlParameter("@IdCardNo", SqlDbType.NChar,255)

            };

            parameters[0].Value = model.ID;
            parameters[1].Value = model.QQMobile;
            parameters[2].Value = model.Email;
            parameters[3].Value = model.LevelTwoPwd;
            parameters[4].Value = model.PropertyPwd;
            parameters[5].Value = model.SecretCardBind;
            parameters[6].Value = model.SecretCardNo;
            parameters[7].Value = model.SecretCardImgUrl;
            parameters[8].Value = model.IdentityAuth;
            parameters[9].Value = model.IdentityCardAUrl;
            parameters[10].Value = model.IdentityCardBUrl;
            parameters[11].Value = model.UserID;
            parameters[12].Value = model.OrderStatus;
            parameters[13].Value = model.SubmitTime;
            parameters[14].Value = model.GameName;
            parameters[15].Value = model.GameArea;
            parameters[16].Value = model.ServerName;
            parameters[17].Value = model.GameAccount;
            parameters[18].Value = model.GamePassword;
            parameters[19].Value = model.AccountRoleName;
            parameters[20].Value = model.IdCardNo;
            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
Пример #2
0
        /// <summary>
        /// 根据ID拿到订单Model
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public AccountInfoModel GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select ID, QQMobile, Email, LevelTwoPwd, PropertyPwd, SecretCardBind, SecretCardNo, SecretCardImgUrl, IdentityAuth, IdentityCardAUrl, IdentityCardBUrl, UserID, OrderStatus, SubmitTime, GameName, GameArea, ServerName, GameAccount, GamePassword, AccountRoleName, IdCardNo  ");
            strSql.Append("  from AccountInfo ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters = {
                    new SqlParameter("@ID", SqlDbType.Int,4)
            };
            parameters[0].Value = ID;

            AccountInfoModel model = new AccountInfoModel();
            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["ID"].ToString() != "")
                {
                    model.ID = int.Parse(ds.Tables[0].Rows[0]["ID"].ToString());
                }
                model.QQMobile = ds.Tables[0].Rows[0]["QQMobile"].ToString();
                model.Email = ds.Tables[0].Rows[0]["Email"].ToString();
                model.LevelTwoPwd = ds.Tables[0].Rows[0]["LevelTwoPwd"].ToString();
                model.PropertyPwd = ds.Tables[0].Rows[0]["PropertyPwd"].ToString();
                if (ds.Tables[0].Rows[0]["SecretCardBind"].ToString() != "")
                {
                    model.SecretCardBind =Convert.ToBoolean(ds.Tables[0].Rows[0]["SecretCardBind"]);
                }
                model.SecretCardNo = ds.Tables[0].Rows[0]["SecretCardNo"].ToString();
                model.SecretCardImgUrl = ds.Tables[0].Rows[0]["SecretCardImgUrl"].ToString();
                if (ds.Tables[0].Rows[0]["IdentityAuth"].ToString() != "")
                {
                    model.IdentityAuth = Convert.ToBoolean(ds.Tables[0].Rows[0]["IdentityAuth"]);
                }
                model.IdentityCardAUrl = ds.Tables[0].Rows[0]["IdentityCardAUrl"].ToString();
                model.IdentityCardBUrl = ds.Tables[0].Rows[0]["IdentityCardBUrl"].ToString();
                if (ds.Tables[0].Rows[0]["UserID"].ToString() != "")
                {
                    model.UserID = int.Parse(ds.Tables[0].Rows[0]["UserID"].ToString());
                }
                if (ds.Tables[0].Rows[0]["OrderStatus"].ToString() != "")
                {
                    model.OrderStatus = (OrderStatus)(int.Parse(ds.Tables[0].Rows[0]["OrderStatus"].ToString()));
                }
                if (ds.Tables[0].Rows[0]["SubmitTime"].ToString() != "")
                {
                    model.SubmitTime = DateTime.Parse(ds.Tables[0].Rows[0]["SubmitTime"].ToString());
                }
                model.GameName = ds.Tables[0].Rows[0]["GameName"].ToString();
                model.GameArea = ds.Tables[0].Rows[0]["GameArea"].ToString();
                model.ServerName = ds.Tables[0].Rows[0]["ServerName"].ToString();
                model.GameAccount = ds.Tables[0].Rows[0]["GameAccount"].ToString();
                model.GamePassword = ds.Tables[0].Rows[0]["GamePassword"].ToString();
                model.AccountRoleName = ds.Tables[0].Rows[0]["AccountRoleName"].ToString();
                model.IdCardNo = ds.Tables[0].Rows[0]["IdCardNo"].ToString();

                return model;
            }
            else
            {
                return null;
            }
        }
Пример #3
0
        public List<AccountInfoModel> GetPagedAccountInfoModelsByProc(int pageIndex, int pageSize, string whereStr,string orderBy,
            out int rowCount,
            out int pageCount)
        {
            List<AccountInfoModel> modelsList = new List<AccountInfoModel>();
            rowCount = 0;
            pageCount = 0;
            IDataParameter[] sqlParameters =
            {
                new SqlParameter("@TableName", "AccountInfo"),
                new SqlParameter("@IDName", "ID"),
                new SqlParameter("@PageIndex", pageIndex),
                new SqlParameter("@PageSize", pageSize),
                new SqlParameter("@Where", whereStr),
                new SqlParameter("@OrderBy",string.IsNullOrEmpty(orderBy)?"order by ID":orderBy),
                new SqlParameter("@RowCount",SqlDbType.Int,25),
                new SqlParameter("@PageCount", SqlDbType.Int,25),
            };
            sqlParameters[6].Direction = ParameterDirection.Output;
            sqlParameters[6].Value = DBNull.Value;
            sqlParameters[7].Direction = ParameterDirection.Output;
            sqlParameters[7].Value = DBNull.Value;
            using (SqlConnection connection = new SqlConnection(DbHelperSQL.connectionString))
            {
                connection.Open();
                SqlCommand cmd = new SqlCommand();
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Connection = connection;
                cmd.Parameters.AddRange(sqlParameters);
                cmd.CommandText = "sp_GetPageDataOutRowPageCount";
                SqlDataReader dataReader = cmd.ExecuteReader();
                using (dataReader)
                {
                    while (dataReader.Read())
                    {
                        AccountInfoModel infoModel = new AccountInfoModel();

                        infoModel.ID = Convert.ToInt32(dataReader["ID"]);
                        infoModel.SubmitTime =
                            Convert.ToDateTime(Convert.IsDBNull(dataReader["SubmitTime"])
                                ? DateTime.MinValue
                                : dataReader["SubmitTime"]);
                        infoModel.GameArea = Convert.ToString(dataReader["GameArea"]);
                        infoModel.GameName = Convert.ToString(dataReader["GameName"]);
                        infoModel.ServerName = Convert.ToString(dataReader["ServerName"]);
                        infoModel.AccountRoleName = Convert.ToString(dataReader["AccountRoleName"]);
                        infoModel.OrderStatus =
                            (OrderStatus) Enum.Parse(typeof (OrderStatus), Convert.ToString(dataReader["OrderStatus"]));
                        modelsList.Add(infoModel);
                    }
                }
                rowCount = Convert.ToInt32(cmd.Parameters["@RowCount"].Value);
                pageCount = Convert.ToInt32(cmd.Parameters["@PageCount"].Value);
                return modelsList;
            }
        }
Пример #4
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(AccountInfoModel model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into AccountInfo(");
            strSql.Append("QQMobile,Email,LevelTwoPwd,PropertyPwd,SecretCardBind,SecretCardNo,SecretCardImgUrl,IdentityAuth,IdentityCardAUrl,IdentityCardBUrl,UserID,OrderStatus,SubmitTime,GameName,GameArea,ServerName,GameAccount,GamePassword,AccountRoleName,IdCardNo");
            strSql.Append(") values (");
            strSql.Append("@QQMobile,@Email,@LevelTwoPwd,@PropertyPwd,@SecretCardBind,@SecretCardNo,@SecretCardImgUrl,@IdentityAuth,@IdentityCardAUrl,@IdentityCardBUrl,@UserID,@OrderStatus,@SubmitTime,@GameName,@GameArea,@ServerName,@GameAccount,@GamePassword,@AccountRoleName,@IdCardNo");
            strSql.Append(") ");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
                        new SqlParameter("@QQMobile", SqlDbType.VarChar,255) ,
                        new SqlParameter("@Email", SqlDbType.VarChar,255) ,
                        new SqlParameter("@LevelTwoPwd", SqlDbType.VarChar,255) ,
                        new SqlParameter("@PropertyPwd", SqlDbType.NChar,255) ,
                        new SqlParameter("@SecretCardBind", SqlDbType.Int,4) ,
                        new SqlParameter("@SecretCardNo", SqlDbType.VarChar,255) ,
                        new SqlParameter("@SecretCardImgUrl", SqlDbType.VarChar,255) ,
                        new SqlParameter("@IdentityAuth", SqlDbType.Int,4) ,
                        new SqlParameter("@IdentityCardAUrl", SqlDbType.NVarChar,255) ,
                        new SqlParameter("@IdentityCardBUrl", SqlDbType.NVarChar,255) ,
                        new SqlParameter("@UserID", SqlDbType.Int,4) ,
                        new SqlParameter("@OrderStatus", SqlDbType.Int,4) ,
                        new SqlParameter("@SubmitTime", SqlDbType.DateTime) ,
                        new SqlParameter("@GameName", SqlDbType.NChar,255) ,
                        new SqlParameter("@GameArea", SqlDbType.NChar,255) ,
                        new SqlParameter("@ServerName", SqlDbType.NChar,255) ,
                        new SqlParameter("@GameAccount", SqlDbType.NChar,255) ,
                        new SqlParameter("@GamePassword", SqlDbType.NChar,255) ,
                        new SqlParameter("@AccountRoleName", SqlDbType.NChar,255) ,
                        new SqlParameter("@IdCardNo", SqlDbType.NChar,255)

            };

            parameters[0].Value = model.QQMobile;
            parameters[1].Value = model.Email;
            parameters[2].Value = model.LevelTwoPwd;
            parameters[3].Value = model.PropertyPwd;
            parameters[4].Value = model.SecretCardBind;
            parameters[5].Value = model.SecretCardNo;
            parameters[6].Value = model.SecretCardImgUrl;
            parameters[7].Value = model.IdentityAuth;
            parameters[8].Value = model.IdentityCardAUrl;
            parameters[9].Value = model.IdentityCardBUrl;
            parameters[10].Value = model.UserID;
            parameters[11].Value = model.OrderStatus;
            parameters[12].Value = model.SubmitTime;
            parameters[13].Value = model.GameName;
            parameters[14].Value = model.GameArea;
            parameters[15].Value = model.ServerName;
            parameters[16].Value = model.GameAccount;
            parameters[17].Value = model.GamePassword;
            parameters[18].Value = model.AccountRoleName;
            parameters[19].Value = model.IdCardNo;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
            if (obj == null)
            {
                return 0;
            }
            else
            {

                return Convert.ToInt32(obj);

            }
        }
Пример #5
0
 /// <summary>
 /// 拿到所有数据
 /// </summary>
 /// <returns></returns>
 public List<AccountInfoModel> GetAllData()
 {
     List<AccountInfoModel> listMode = new List<AccountInfoModel>();
     DataSet ds = GetList("");
     DataTable dt = ds.Tables[0];
     foreach (DataRow dr in dt.Rows)
     {
         AccountInfoModel mode = new AccountInfoModel();
         mode.ID = Convert.ToInt32(dr["ID"]);
         mode.GameName = Convert.ToString(dr["GameName"]);
         mode.GameArea = Convert.ToString(dr["GameArea"]);
         mode.ServerName = Convert.ToString(dr["ServerName"]);
         mode.AccountRoleName = Convert.ToString(dr["AccountRoleName"]);
         mode.SubmitTime = Convert.ToDateTime(Convert.IsDBNull(dr["SubmitTime"]) ? DateTime.MinValue : dr["SubmitTime"]);
         mode.OrderStatus = (OrderStatus)dr["OrderStatus"];
         listMode.Add(mode);
     }
     return listMode;
 }
Пример #6
0
 /// <summary>
 /// 根据条件查到AccountInfoModels;
 /// </summary>
 /// <param name="strWhere"></param>
 /// <returns></returns>
 public List<AccountInfoModel> GetAccountInfoModelsList(string strWhere)
 {
     List<AccountInfoModel> accountInfoModels = new List<AccountInfoModel>();
     DataSet ds = GetList(strWhere);
     DataTable dt = ds.Tables[0];
     foreach (DataRow dr in dt.Rows)
     {
         AccountInfoModel accountInfoModel = new AccountInfoModel();
         accountInfoModel.ID = Convert.ToInt32(dr["ID"]);
         //accountInfoModel.GameName = Convert.ToString(dr["GameName"]).Trim();
         accountInfoModel.GameArea = Convert.ToString(dr["GameArea"]).Trim();
         accountInfoModel.GameAccount = Convert.ToString(dr["GameAccount"]).Trim();
         accountInfoModel.ServerName = Convert.ToString(dr["ServerName"]).Trim();
         accountInfoModel.GamePassword = Convert.ToString(dr["GamePassword"]).Trim();
         accountInfoModels.Add(accountInfoModel);
     }
     return accountInfoModels;
 }
Пример #7
0
        /// <summary>
        /// 用户确认提交帐户信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            //收集用户信息
            string gameNameStr = gameName.SelectedItem.Text.Trim();
            string gameAreaStr = gameArea.SelectedItem.Text.Trim();
            string gameAccountStr = gameAccount.Text.Trim();
            //验证两次输入是否一样
            string gamePwdStr = gamePwd.Text;
            string regamePwdStr = regamePwd.Text;
            string gameRoleNameStr = gameRoleName.Text;
            string identityCardIdStr = identityCardID.Text;
            string qqMobileStr = qqOrMobile.Text;
            string emailStr = userEmail.Text;
            string secondLevelPwdStr = levelTwoPwd.Text;
            string propertyPwdStr = propertyPwd.Text;
            //如果选择图片上传 上传成功Url写入Hidden filed
            bool isBindSecretCardBool = isBindSecretCard.Checked;
            //绑定了密保卡,如果隐藏域中密保卡Url为空则说明没有绑定
            if (isBindSecretCardBool)
            {
                string url = SecretCardImg.Value;
                if (string.IsNullOrEmpty(url)||string.IsNullOrEmpty(txtSecretNo.Text.Trim()))
                {
                    isBindSecretCardBool = false;
                }
            }
            bool bindIdentityCardBool = bindIdentityCard.Checked;
            if (bindIdentityCardBool)
            {
                string shenFenUrlA = identityImgA.Value;
                string shenFenUrlB = identityImgB.Value;
                if (string.IsNullOrEmpty(shenFenUrlA) || string.IsNullOrEmpty(shenFenUrlB))
                {
                    bindIdentityCardBool = false;
                }
            }

            #region 数据验证
            int gameId, areaId, serverId;
            if(!int.TryParse(gameName.SelectedValue,out gameId)){
            ClientScript.RegisterClientScriptBlock(GetType(), "alert", "<script>alert('游戏名称选择有误,请重新选择!')</script>");
                return;
            }
            if(!int.TryParse(gameArea.SelectedValue,out areaId)){
            ClientScript.RegisterClientScriptBlock(GetType(), "alert", "<script>alert('游戏所属大区选择有误,请重新选择!')</script>");
                return;
            }
               if (!int.TryParse(hiddenGameServer.Value, out serverId))
            {

                ClientScript.RegisterClientScriptBlock(GetType(), "alert", "<script>alert('游戏所在属大区无服务器!')</script>");
                return;
            }
            //拿到服务器信息
            GameServer gameServerModel = _gameServerDataAccess.GetModel(serverId);
            string    gameServerName = gameServerModel.ServerName;
            if (gamePwdStr != regamePwdStr) {
                ClientScript.RegisterClientScriptBlock(GetType(), "alert", "<script>alert('两次输入游戏密码不一致,请重新输入!')</script>");
                return;
            }
            if (string.IsNullOrEmpty(gameAccountStr) || string.IsNullOrEmpty(gamePwdStr) || string.IsNullOrEmpty(gameRoleNameStr) || string.IsNullOrEmpty(identityCardIdStr) || string.IsNullOrEmpty(qqMobileStr) || string.IsNullOrEmpty(emailStr) || string.IsNullOrEmpty(secondLevelPwdStr) || string.IsNullOrEmpty(propertyPwdStr))
            {
                ClientScript.RegisterClientScriptBlock(GetType(), "alert", "<script>alert('所有标星号的为必真字段,不能为空!')</script>");
                return;
            }
            //对所有字段进行验证
            #endregion
            AccountInfoModel accountModel = new AccountInfoModel();
            accountModel.GameName = gameNameStr;
            accountModel.GameArea = gameAreaStr;
            accountModel.ServerName = gameServerName;
            accountModel.GameAccount = gameAccountStr;
            accountModel.GamePassword = gamePwdStr;
            accountModel.AccountRoleName = gameRoleNameStr;
            accountModel.IdCardNo = identityCardIdStr;
            accountModel.QQMobile = qqMobileStr;
            accountModel.Email = emailStr;
            accountModel.LevelTwoPwd = secondLevelPwdStr;
            accountModel.PropertyPwd = propertyPwdStr;
            accountModel.IdentityAuth = bindIdentityCardBool;
            accountModel.IdentityCardAUrl = identityImgA.Value;
            accountModel.IdentityCardBUrl = identityImgB.Value;
            accountModel.SecretCardBind = isBindSecretCardBool;
            accountModel.SecretCardImgUrl = SecretCardImg.Value;
            accountModel.SecretCardNo = txtSecretNo.Text.Trim();
            //指定订单状态未完成
            accountModel.OrderStatus = OrderStatus.NotComplete;
            //指定用户ID为0 后续处理用户登陆问题
            accountModel.UserID = CurrentUser.ID;
            bool res=false;
            if (accountInfoID.Value != "")
            {
                accountModel.ID = Convert.ToInt32(accountInfoID.Value);
                res =  _accountInfoDataAccess.Update(accountModel);
                if (res)
                {
                    //用户未生成完成的订单号传递给帐号详细页面
                    Response.Redirect("/accountDescription.aspx?infoId=" + accountModel.ID);
                }
                else
                {
                    ClientScript.RegisterClientScriptBlock(GetType(), "alert", "<script>alert('帐号发布出错,请重试!')</script>");
                }
            }
            else
            {
               var resInt = _accountInfoDataAccess.Add(accountModel);
                if (resInt > 0)
                {
                    //用户未生成完成的订单号传递给帐号详细页面
                    Response.Redirect("/accountDescription.aspx?infoId=" + resInt);
                }
                else
                {
                    ClientScript.RegisterClientScriptBlock(GetType(), "alert", "<script>alert('帐号发布出错,请重试!')</script>");
                }
            }
        }
Пример #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //如果第一次加载页面,填充游戏的下拉选框 包含大区
     if (!IsPostBack)
     {
         //游戏下拉框
         List<GameInfo> gameList = new List<GameInfo>();
         gameList = _gameInfoAccess.GameInfoList();
         foreach (var item in gameList)
         {
             ListItem listItem = new ListItem();
             listItem.Text = item.GameName.Trim();
             listItem.Value = Convert.ToString(item.ID);
             gameName.Items.Add(listItem);
         }
         //大区下拉选框
         List<GameArea> areaList = new List<GameArea>();
         areaList = _gameAreaDataAccess.GameAreaList();
         gameArea.Items.Clear();
         foreach (var item in areaList)
         {
             ListItem listItem = new ListItem();
             listItem.Text = item.AreaName.Trim();
             listItem.Value = Convert.ToString(item.ID);
             gameArea.Items.Add(listItem);
         }
         //检察AccountInfo里是否有未完成订单
         var accountInfo = _accountInfoDataAccess.GetAccountINfoNotCompleteByUserId(CurrentUser.ID);
         if (accountInfo != null &&accountInfo.ID > 0)
         {
             //查到订单后渲染页面
            DrawPageByAccountInfo(accountInfo);
            CurrentAccountInfoModel = accountInfo;
            accountInfoID.Value = accountInfo.ID.ToString();
         }
     }
 }
Пример #9
0
 protected void DrawPageByAccountInfo(AccountInfoModel accountInfoModel)
 {
     gameAccount.Text = accountInfoModel.GameAccount.Trim();
     gameRoleName.Text = accountInfoModel.AccountRoleName;
     identityCardID.Text = accountInfoModel.IdCardNo;
     qqOrMobile.Text = accountInfoModel.QQMobile;
     userEmail.Text = accountInfoModel.Email;
     levelTwoPwd.Text = accountInfoModel.LevelTwoPwd;
     propertyPwd.Text = accountInfoModel.PropertyPwd;
     if (accountInfoModel.SecretCardBind)
     {
         txtSecretNo.Text = accountInfoModel.SecretCardNo;
     }
 }
Пример #10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //通用页面传过来的ID值查到订单信息展示订单,
     //默认所有的字段只读,当用户点编辑时,所有字段可编辑,并显示保存按钮,
     //当用户点击保存时更新字段
     //读取订单信息
     if (!IsPostBack)
     {
         string orderId = Request.QueryString.Get("InfoID");
         int intOrderId;
         //读取订单ID,如果ID错误则跳回列表页
         if (!int.TryParse(orderId, out intOrderId))
         {
             ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", "<script>alert('订单ID有误,返回列表页面!');window.location.href='/Index.aspx'</script>");
             return;
         }
         AccountInfoModel infoModel = _accountInfoDataAccess.GetModel(intOrderId);
         _accountInfoModel = infoModel;
         //添加选项
      /*   string[] statusName = Enum.GetNames(typeof(OrderStatus));
         for (int i = 0; i < statusName.Count(); i++)
         {
             ListItem listItem = new ListItem();
             listItem.Text = statusName[i];
             listItem.Value = Convert.ToString(i);
             //listItem.Value = statusInt[i].ToString();
             DplOrderStatus.Items.Add(listItem);
         }
         DplOrderStatus.Enabled = false;
         DplOrderStatus.SelectedIndex = (int) infoModel.OrderStatus;*/
         if (infoModel == null || infoModel.ID <= 0)
         {
             ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", "<script>alert('订单数据有误,请返回列表页面重试!');window.location.href='/Index.aspx'</script>");
             return;
         }
         hiddenAccountInfoID.Value = orderId;
     }
     textAreaProductDes.Text = CurrentAccountDescription.ProductDescription;
 }