Ejemplo n.º 1
0
        /// <summary>
        /// 打开添加用户窗体
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void barButtonItem1_ItemClick(object sender, ItemClickEventArgs e)
        {
            UserInfoForm uf = new UserInfoForm();

            uf.StartPosition = FormStartPosition.CenterScreen;
            uf.Text          = "新增用户信息";
            uf.ShowDialog();
            ResfurbishData();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 修改用户
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void barButtonItem2_ItemClick_1(object sender, ItemClickEventArgs e)
        {
            DataRow dr = this.gridBand1.View.GetFocusedDataRow();

            if (dr != null)
            {
                string       no  = dr["NO"].ToString();
                UserInfoForm uif = new UserInfoForm(no);
                uif.StartPosition = FormStartPosition.CenterScreen;
                uif.Text          = "修改用户信息";
                uif.ShowDialog();
                ResfurbishData();
            }
            else
            {
                MessageBox.Show("请选择一条用户信息!", "提示");
            }
        }