Exemplo n.º 1
0
        //private void BindGvEmployeeView()
        //{
        //    myDataTable = myBUCMS_Employee.GetOrder(false, string.Empty, string.Empty, false);
        //    gvEmployeeView.DataSource = myDataTable;
        //}
        /// <summary>
        /// 添加(&A)员工信息按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmAddEmployee myfrmAddEmployee = new frmAddEmployee();

            if (myfrmAddEmployee.ShowDialog() == DialogResult.OK)
            {
                BindGvEmployee();

                BindGvEmployeeView();
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 修改(&U)员工信息按钮事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (fExtendedEditMode)
     {
         if (editOrderlayoutView.Columns.Count < 0)
         {
             XtraMessageBox.Show("请选择要修改(&U)的员工信息!");
             return;
         }
         paramID = editOrderlayoutView.GetFocusedRowCellValue(gcID).ToString();
     }
     else
     {
         paramID = gvEmployeeMain.GetFocusedRowCellValue(gcID).ToString();
     }
     myfrmAddEmployee = new frmAddEmployee(paramID);
     if (myfrmAddEmployee.ShowDialog() == DialogResult.OK)
     {
         BindGvEmployee();
     }
 }