Esempio n. 1
0
        void insert_record(object sender, EventArgs e)
        {
            frm_NHAN_VIEN_EDIT frm_edit = new frm_NHAN_VIEN_EDIT(this, true);

            frm_edit.ShowDialog();
            Grid_Process();
        }
Esempio n. 2
0
        void edit_record(object sender, EventArgs e)
        {
            DataRowView current_row = (DataRowView)gv_DATA.GetFocusedRow();

            if (current_row == null)
            {
                return;
            }
            string             row_code = current_row.Row.ItemArray[1].ToString();
            frm_NHAN_VIEN_EDIT frm_edit = new frm_NHAN_VIEN_EDIT(row_code);

            if (frm_edit.ShowDialog() == DialogResult.OK)
            {
                dg_DATA.DataSource = DAO_HRM_EMPLOYEE.Get_Data();
                int rowHandle = gv_DATA.LocateByValue(column_code, row_code);
                if (rowHandle != DevExpress.XtraGrid.GridControl.InvalidRowHandle)
                {
                    gv_DATA.FocusedRowHandle = rowHandle;
                }
                Grid_Process();
            }
        }