void Xem() { if (!tlbView.IsEnabled) { return; } Cursor = Cursors.Wait; if (raddgrHDTDDS.SelectedItems.Count == 1) { DataRowView dr = (DataRowView)raddgrHDTDDS.SelectedItem; Cursor = Cursors.Wait; ucKiemSoatRuiRoCT objHDTDThoaThuan = new ucKiemSoatRuiRoCT(); objHDTDThoaThuan.obj = new Presentation.Process.TinDungTDServiceRef.TD_KIEM_SOAT_RR(); objHDTDThoaThuan.obj = LayGiaTriObject(); objHDTDThoaThuan.objExt = new ThuocTinh.TD_KIEM_SOAT_RR_EXT(); objHDTDThoaThuan.objExt = LayGiaTriObjectExt(); objHDTDThoaThuan.Action = DatabaseConstant.Action.XEM; objHDTDThoaThuan.OnSavingCompleted += new EventHandler(objHDTDThoaThuan_OnSavingCompleted); string tittle = DatabaseConstant.layNgonNguTieuDeForm(this.Function); Window window = new Window(); window.Title = tittle; window.WindowStartupLocation = WindowStartupLocation.CenterScreen; window.Content = objHDTDThoaThuan; window.ShowDialog(); Cursor = Cursors.Arrow; } else if (raddgrHDTDDS.SelectedItems.Count > 1) { LMessage.ShowMessage("M.DungChung.KhongDuocChonNhieu", LMessage.MessageBoxType.Warning); } Cursor = Cursors.Arrow; }
void ThemMoi() { if (!tlbAdd.IsEnabled) { return; } Cursor = Cursors.Wait; ucKiemSoatRuiRoCT objHDTDThoaThuan = new ucKiemSoatRuiRoCT(); objHDTDThoaThuan.Action = DatabaseConstant.Action.THEM; objHDTDThoaThuan.OnSavingCompleted += new EventHandler(objHDTDThoaThuan_OnSavingCompleted); string tittle = DatabaseConstant.layNgonNguTieuDeForm(this.Function); Window window = new Window(); window.Title = tittle; window.WindowStartupLocation = WindowStartupLocation.CenterScreen; window.Content = objHDTDThoaThuan; window.ShowDialog(); Cursor = Cursors.Arrow; }