コード例 #1
0
        private void _print()
        {
            rptBCHoatDongTapHuan rpt      = new rptBCHoatDongTapHuan();
            CategoryTapHuan      enumLoai = (CategoryTapHuan)_id_loai;
            //switch (enumLoai)
            //{
            //    case CategoryTapHuan.TH_TAPHUAN:
            var data = (from p in context.QL_HOATDONG_TAPHUAN
                        where deSearchTuNgay.DateTime.Date <= p.TH_THOIGIAN_BATDAU &&
                        p.TH_THOIGIAN_BATDAU <= deSearchDenNgay.DateTime.Date &&
                        p.TH_LOAI_ID == _id_loai
                        select p).ToList();
            List <clsHoatDongTapHuan> listTapHuan = new List <clsHoatDongTapHuan>();

            foreach (QL_HOATDONG_TAPHUAN row in data)
            {
                clsHoatDongTapHuan item = new clsHoatDongTapHuan();
                item.TH_TEN      = row.TH_TEN;
                item.TH_THOIGIAN = FunctionHelper.formatFromDateToDate(row.TH_THOIGIAN_BATDAU, row.TH_THOIGIAN_KETTHUC);
                //item.TH_DIADIEM = row.TH_DIADIEM;
                //item.TH_DONVI_THUCHIEN = row.TH_DONVI_THUCHIEN;
                //item.TH_SOLUONG = row.TH_SOLUONG;
                //item.TH_TONGTIEN = row.TH_TONGTIEN??0;
                item.TH_NOIDUNG = row.TH_NOIDUNG;
                listTapHuan.Add(item);
            }
            DataTable dataTapHuan = FunctionHelper.ConvertToDataTable(listTapHuan);

            dataTapHuan.TableName = "HoatDongTapHuan";

            rpt.pLeftHeader.Value       = clsParameter.pHospital;
            rpt.pParentLeftHeader.Value = clsParameter.pParentHospital;
            rpt.pTitle.Value            = lueLoaiTapHuan.Text.ToUpper();
            rpt.pTuNgayDenNgay.Value    = FunctionHelper.formatFromDateToDate(deSearchTuNgay.DateTime, deSearchDenNgay.DateTime);
            //rpt.pTitleFooter.Value = ReportHelper.getTitleFooter(LoaiBaoCao.BM10);
            //rpt.pValueFooter.Value = ReportHelper.getValueFooter(LoaiBaoCao.BM10);

            rpt.DataSource = dataTapHuan;
            rpt.DataMember = "HoatDongTapHuan";
            //        break;
            //    default:
            //        break;
            //}

            frmPrint f = new frmPrint(rpt);

            f.ShowDialog();
        }
コード例 #2
0
        private void _changeLayout(CategoryTapHuan enumLoai)
        {
            switch (enumLoai)
            {
            case CategoryTapHuan.TH_TAPHUAN:
                layThongTinGV.Visibility             = layGiangVienThuLao.Visibility
                                                     = layThongTinGV_empty.Visibility = layNguoiHoTro_empty.Visibility
                                                                                            = layNguoiHoTro.Visibility = layHoTroThuLao.Visibility = LayoutVisibility.Always;
                grpSearchTitle.Text = "Danh sách hoạt động tập huấn";
                break;

            case CategoryTapHuan.TH_GIAODUC:
                grpSearchTitle.Text      = "Danh sách hoạt động giáo dục";
                layThongTinGV.Visibility = layThongTinGV_empty.Visibility = LayoutVisibility.Always;
                break;

            case CategoryTapHuan.HUONG_DAN_THUC_TAP:
                grpSearchTitle.Text = "Danh sách hoạt động hướng dẫn thực tập";
                break;

            case CategoryTapHuan.VAN_DONG_CHINH_SACH:
                laySoNguoiThamGia.Visibility = laySoTienTrenNguoi.Visibility = layTongTien.Visibility = LayoutVisibility.Never;
                layNguoiHoTro.Visibility     = LayoutVisibility.Always;
                layNguoiHoTro.Text           = "Người thực hiện";
                layDiaDiem.Text     = "Nơi nhận";
                grpSearchTitle.Text = "Danh sách hoạt động vận động chính sách";
                break;

            case CategoryTapHuan.TRUYEN_THONG_PHAP_LY:
                layDonViThucHien.Visibility = LayoutVisibility.Always;
                grpSearchTitle.Text         = "Danh sách hoạt động truyền thông pháp lý";
                break;

            default:
                break;
            }
        }