Example #1
0
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmFunction function = new frmFunction();

            function.ShowDialog();
            loaddatafunction();
        }
Example #2
0
        private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int    row_index      = gridView1.FocusedRowHandle;
            string col_field_name = "FunctionID";
            object value          = gridView1.GetRowCellValue(row_index, col_field_name);

            if (value != null)
            {
                frmFunction f = new frmFunction();
                f.ID = (int)value;
                f.ShowDialog();
            }
            else
            {
                XtraMessageBox.Show("Bạn chưa chọn đối tượng để chỉnh sửa ", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            loaddatafunction();
        }