Esempio n. 1
0
        private void btnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            FormUserEidt frm = new FormUserEidt();

            frm.IsAddNew = true;
            if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                LoadData();
            }
        }
Esempio n. 2
0
        private void btnEidt_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            DataRow row = gridView1.GetFocusedDataRow();

            if (null == row)
            {
                MessageBox.Show(rowEidt, strAlert, MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            FormUserEidt frm = new FormUserEidt();

            frm.IsAddNew = false;
            frm.Id       = Convert.ToInt32(row["id"]);
            if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                LoadData();
            }
        }