예제 #1
0
        /// <summary>
        /// Xử lý sự kiện thêm
        /// </summary>
        private void Them()
        {
            Window       window = new Window();
            ucTaiKhoanCT uc     = new ucTaiKhoanCT();

            uc.TthaiNvu = "";
            window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            window.Title = DatabaseConstant.layNgonNguTieuDeForm(DatabaseConstant.Function.KT_TAI_KHOAN_CT);

            window.Content = uc;
            window.ShowDialog();
            TimKiem();
        }
예제 #2
0
        /// <summary>
        /// Xử lý sự kiện sửa
        /// </summary>
        private void Xem()
        {
            DataRowView dr = (DataRowView)raddgrDanhSachTK.SelectedItem;

            if (dr == null)
            {
                LMessage.ShowMessage("M.DungChung.ChuaChonBanGhi", LMessage.MessageBoxType.Warning);
            }
            else
            {
                Window       window = new Window();
                ucTaiKhoanCT uc     = new ucTaiKhoanCT(Convert.ToInt32(dr["ID"]), dr["TTHAI_NVU"].ToString(), DatabaseConstant.Action.XEM);
                window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                window.Title   = DatabaseConstant.layNgonNguTieuDeForm(DatabaseConstant.Function.KT_TAI_KHOAN_CT);
                window.Content = uc;
                window.ShowDialog();
            }
        }