private bool DataToRow()
        {
            string strAccount      = textBox_Account.Text.Trim();
            bool   AccountComplict = false;

            foreach (DataRow r in UserFatherWindow.LoadUser().Rows)
            {
                if (r["User_ID"].ToString() == strAccount && r["User_ID"].ToString() != UserRow["User_ID"].ToString())
                {
                    AccountComplict = true;
                    break;
                }
            }
            if (AccountComplict == true)
            {
                MessageBox.Show("有重复的帐号,请换一个帐号名!");
                return(false);
            }
            UserRow["User_ID"]    = int.Parse(strAccount);
            UserRow["PassWord"]   = textBox_Code.Text.Trim();
            UserRow["City"]       = textBox_Address.Text.Trim();
            UserRow["Mobile"]     = textBox_cell.Text.Trim();
            UserRow["Email"]      = textBox_Email.Text.Trim();
            UserRow["CenterCode"] = textBox_CeenterCode.Text.Trim();
            UserRow["Company"]    = textBox_Company.Text.Trim();


            return(true);
        }
        private void UserInfo_Load(object sender, EventArgs e)
        {
            //databaseName = dbMySql.GetDatabaseName();//
            UserFatherWindow = (account)this.Owner;

            DataTable table = UserFatherWindow.LoadUser();

            dtUser = table;
            if (strOwnParam == "insert")
            {
                UserRow = dtUser.NewRow();
            }
            else
            {
                UserRow = (UserFatherWindow.dataGridView1.CurrentRow.DataBoundItem as DataRowView).Row as DataRow;
                ShowAll();
            }
        }