public void DoYes()
        {
            daTrangThaiBaoCao   dTTBC  = new daTrangThaiBaoCao();
            daDuLieuBaoCaoB0205 dB0205 = new daDuLieuBaoCaoB0205();

            dTTBC.TT.MaBaoCao      = MaBieuBaoCao;
            dTTBC.TT.IDTrangThai   = (int)daDanhMuc.eTrangThai.Khởi_tạo_lại_Báo_cáo;
            dTTBC.TT.TenTrangThai  = "Khởi tạo lại Báo cáo";
            dTTBC.TT.NguoiThucHien = UIHelper.daPhien.MaNSD + ":" + UIHelper.daPhien.TenNguoiSuDung;

            dB0205.MaBieuBaoCao  = MaBieuBaoCao;
            dB0205.IDMauBieu     = IDMauBieu;
            dB0205.Thang         = Thang;
            dB0205.Nam           = Nam;
            dB0205.MaDonVi       = UIHelper.daPhien.MaDonVi;
            dB0205.MaDonViSTK1   = UIHelper.daPhien.ThongTinDN.MaSTK1;
            dB0205.NguoiThucHien = UIHelper.daPhien.MaNSD + ":" + UIHelper.daPhien.TenNguoiSuDung;

            dB0205.KhoiTao();

            daSoLieuSTK1 dSLSTK1 = new daSoLieuSTK1();

            dSLSTK1.Thang       = Thang;
            dSLSTK1.Nam         = Nam;
            dSLSTK1.MaDonViSTK1 = UIHelper.daPhien.ThongTinDN.MaSTK1;
            dSLSTK1.LaySoLieuSTK1_DonVi();

            dB0205.LaySoLieuSTK1();

            dB0205.TinhDanSuat();

            DanhSachNhap();
        }
Esempio n. 2
0
        protected void btnTaoBaoCao_Click(object sender, DirectEventArgs e)
        {
            daBieuBaoCao      dBBC  = new daBieuBaoCao();
            daTrangThaiBaoCao dTTBC = new daTrangThaiBaoCao();
            daDuLieuBCN       dBCN  = new daDuLieuBCN();

            dBBC.BieuBC.Thang           = ucBieuBC1.Thang;
            dBBC.BieuBC.Nam             = ucBieuBC1.Nam;
            dBBC.BieuBC.IDBieuDinhNghia = ucBieuBC1.IDMauBieuDinhNghia;
            dBBC.BieuBC.DonVi           = UIHelper.daPhien.MaDonVi;
            dBBC.BieuBC.TrangThai       = (int)daDanhMuc.eTrangThai.Nhập_số_liệu;
            dBBC.SinhMaBaoCao();

            dTTBC.TT.MaBaoCao      = dBBC.BieuBC.MaBaoCao;
            dTTBC.TT.IDTrangThai   = (int)daDanhMuc.eTrangThai.Nhập_số_liệu;
            dTTBC.TT.TenTrangThai  = "Nhập số liệu";
            dTTBC.TT.NguoiThucHien = UIHelper.daPhien.MaNSD + ":" + UIHelper.daPhien.TenNguoiSuDung;

            dBCN.BCN.MaBieuBaoCao = dBBC.BieuBC.MaBaoCao;
            dBCN.IDMauBieu        = dBBC.BieuBC.IDBieuDinhNghia.Value;
            dBCN.Thang            = ucBieuBC1.Thang;
            dBCN.Nam          = ucBieuBC1.Nam;
            dBCN.MaDonVi      = UIHelper.daPhien.MaDonVi;
            dBCN.MaDonViSTK1  = UIHelper.daPhien.ThongTinDN.MaSTK1;
            dBCN.MaBieuBaoCao = dBBC.BieuBC.MaBaoCao;

            if (dBBC.ThongTin() == null)
            {
                dBBC.Them();

                dTTBC.Them();

                switch (dBBC.BieuBC.IDBieuDinhNghia)
                {
                case 1:
                    dBCN.KhoiTao();

                    dBCN.LaySTK1();

                    dBCN.TinhDanSuatSTK1();
                    break;

                case 3:
                    daDuLieuBaoCaoB0205 dB0205 = new daDuLieuBaoCaoB0205();
                    dB0205.MaBieuBaoCao  = dBBC.BieuBC.MaBaoCao;
                    dB0205.IDMauBieu     = dBBC.BieuBC.IDBieuDinhNghia.Value;
                    dB0205.Thang         = (byte)dBBC.BieuBC.Thang;
                    dB0205.Nam           = dBBC.BieuBC.Nam.Value;
                    dB0205.MaDonVi       = UIHelper.daPhien.MaDonVi;
                    dB0205.MaDonViSTK1   = UIHelper.daPhien.ThongTinDN.MaSTK1;
                    dB0205.NguoiThucHien = UIHelper.daPhien.MaNSD + ":" + UIHelper.daPhien.TenNguoiSuDung;

                    dB0205.KhoiTao();

                    dB0205.LaySoLieuSTK1();

                    dB0205.TinhDanSuat();
                    break;
                }


                DanhSachBaoCaoLap();
            }

            wTaoBieuBaoCao.Hide();
        }