private void SlaverBtnClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { Common.frmSelItem mySelItem = new Common.frmSelItem(); mySelItem.myBill = this; if (mySelItem.ShowDialog() == DialogResult.OK) { DataRow dr; DataRow drCurrent = ((DataRowView)binItem.Current).Row; DataLib.sysClass myClass = new DataLib.sysClass(); if (mySelItem.TabControl.SelectedTabPageIndex == 0) { dr = mySelItem.gvMain.GetDataRow(mySelItem.gvMain.FocusedRowHandle); myClass.GetItem(dr["F_ID"].ToString(), 0, drCurrent, this.Name); gvItem.UpdateCurrentRow(); } else { dr = mySelItem.gvStore.GetDataRow(mySelItem.gvStore.FocusedRowHandle); myClass.GetStoreItem(dr, 0, drCurrent, this.Name); gvItem.UpdateCurrentRow(); } } mySelItem.Dispose(); }