private void GetUserID(string UserName)
        {
            var _clsGetUserView = new BllUser();
            var _dtGetUserView  = _clsGetUserView.GetUserView(UserName);

            if (_dtGetUserView != null && _dtGetUserView.Rows.Count > 0)
            {
                lbAccountID2.Text      = _dtGetUserView.Rows[0]["AccountID"].ToString();
                lbFullNameMessage.Text = _dtGetUserView.Rows[0]["FullName"].ToString();
                lbMsgSendMessage.Text  = "Vui lòng để lại lời nhắn cho <b>" + _dtGetUserView.Rows[0]["FullName"] + " </b>";
            }
        }
Exemple #2
0
        private void GetUserView(string UserName)
        {
            var _clsGetUserView = new BllUser();
            var _dtGetUserView  = _clsGetUserView.GetUserView(UserName);

            if (_dtGetUserView != null && _dtGetUserView.Rows.Count > 0)
            {
                _htmlFullName       = _dtGetUserView.Rows[0]["FullName"].ToString();
                lbUserNameMain.Text = _dtGetUserView.Rows[0]["UserName"].ToString();
                if (String.IsNullOrEmpty(_dtGetUserView.Rows[0]["User_Image"].ToString()) ||
                    _dtGetUserView.Rows[0]["User_Image"] == DBNull.Value)
                {
                    _htmlAvatarMain = "../img/unnamed.png";
                }
                else
                {
                    _htmlAvatarMain = _dtGetUserView.Rows[0]["User_Image"].ToString();
                }
            }
        }
        private void GetUserView(string UserName)
        {
            var _clsGetUserView            = new BllUser();
            var _clsGetFollowerSendMessage = new BllFollower();
            var _dtGetUserView             = _clsGetUserView.GetUserView(UserName);

            if (_dtGetUserView != null && _dtGetUserView.Rows.Count > 0)
            {
                Page.Title        = _dtGetUserView.Rows[0]["FullName"].ToString();
                lbUserMain.Text   = _dtGetUserView.Rows[0]["AccountID"].ToString();
                lbAccountID2.Text = _dtGetUserView.Rows[0]["AccountID"].ToString();
                if (Session["login"] != null &&
                    Session["AccountID"] != null)
                {
                    var _dtGetFollowerSendMessage =
                        _clsGetFollowerSendMessage.GetFollowerSendMessage(int.Parse(Session["AccountID"].ToString()),
                                                                          int.Parse(lbUserMain.Text));
                    if (_dtGetFollowerSendMessage != null && _dtGetFollowerSendMessage.Rows.Count > 0)
                    {
                        btnSendMessageClick.Visible = true;
                    }
                }
            }
        }
        private void GetUserView(string UserName)
        {
            var _clsGetUserView = new BllUser();
            var _dtGetUserView  = _clsGetUserView.GetUserView(UserName);

            if (_dtGetUserView != null && _dtGetUserView.Rows.Count > 0)
            {
                Page.Title    = _dtGetUserView.Rows[0]["FullName"].ToString();
                _htmlFullName = _dtGetUserView.Rows[0]["FullName"].ToString();
                lbID.Text     = _dtGetUserView.Rows[0]["AccountID"].ToString();
                if (String.IsNullOrEmpty(_dtGetUserView.Rows[0]["User_Image"].ToString()) ||
                    _dtGetUserView.Rows[0]["User_Image"] == DBNull.Value)
                {
                    _htmlAvatarMain = "../img/unnamed.png";
                }
                else
                {
                    _htmlAvatarMain = _dtGetUserView.Rows[0]["User_Image"].ToString();
                }
                txtFullName.Attributes.Add("Disabled", "");
                txtEmail.Attributes.Add("Disabled", "");
                txtCellPhone.Attributes.Add("Disabled", "");
                txtBirthday.Attributes.Add("Disabled", "");
                rdMade.Enabled           = false;
                rdFeMade.Enabled         = false;
                drCountry.Enabled        = false;
                drLanguage.Enabled       = false;
                AsyncFileUpload1.Enabled = false;
                lbID.Text          = _dtGetUserView.Rows[0]["AccountID"].ToString();
                txtFullName.Value  = _dtGetUserView.Rows[0]["FullName"].ToString();
                txtEmail.Value     = _dtGetUserView.Rows[0]["Email"].ToString();
                txtCellPhone.Value = _dtGetUserView.Rows[0]["CellPhone"].ToString();
                txtBirthday.Value  = _dtGetUserView.Rows[0]["Birthday"].ToString();
                if (String.IsNullOrEmpty(_dtGetUserView.Rows[0]["DateBegin"].ToString()) ||
                    _dtGetUserView.Rows[0]["DateBegin"] == DBNull.Value)
                {
                    lbDateBegin.Text = DateTime.Now.ToString();
                }
                else
                {
                    lbDateBegin.Text = _dtGetUserView.Rows[0]["DateBegin"].ToString();
                }
                if (String.IsNullOrEmpty(_dtGetUserView.Rows[0]["User_Image"].ToString()) ||
                    _dtGetUserView.Rows[0]["User_Image"] == DBNull.Value)
                {
                    lbPathImg.Text = string.Empty;
                }
                else
                {
                    lbPathImg.Text = _dtGetUserView.Rows[0]["User_Image"].ToString();
                }
                if (_dtGetUserView.Rows[0]["Gender"].ToString() == "Nam")
                {
                    rdMade.Checked   = true;
                    rdFeMade.Checked = false;
                }
                else
                {
                    rdMade.Checked   = false;
                    rdFeMade.Checked = true;
                }
                if (String.IsNullOrEmpty(_dtGetUserView.Rows[0]["Country_ID"].ToString()) ||
                    _dtGetUserView.Rows[0]["Country_ID"] == DBNull.Value)
                {
                    drCountry.SelectedIndex = -1;
                }
                else
                {
                    drCountry.SelectedValue = _dtGetUserView.Rows[0]["Country_ID"].ToString();
                }
                if (String.IsNullOrEmpty(_dtGetUserView.Rows[0]["Language_ID"].ToString()) ||
                    _dtGetUserView.Rows[0]["Language_ID"] == DBNull.Value)
                {
                    drLanguage.SelectedIndex = -1;
                }
                else
                {
                    drLanguage.SelectedValue = _dtGetUserView.Rows[0]["Language_ID"].ToString();
                }
            }
        }