private void cbbThoiGian_SelectedIndexChanged(object sender, EventArgs e)
        {
            tbHoTH.Text         = ThongKeBUS.DemSoHoKhau("sohokhau.sosohokhau", cbbThoiGian.SelectedValue.ToString());
            tbNhanKhauTH.Text   = ThongKeBUS.DemNhanKhauThuongTru("nhankhauthuongtru.madinhdanh", cbbThoiGian.SelectedValue.ToString());
            tbNKThanhThiTH.Text = ThongKeBUS.DemNhanKhauThuongTru("nhankhauthuongtru.madinhdanh", cbbThoiGian.SelectedValue.ToString(), "noithuongtru not like '%xã%'");
            tbNKNuTH.Text       = ThongKeBUS.DemNhanKhauThuongTru("nhankhauthuongtru.madinhdanh", cbbThoiGian.SelectedValue.ToString(), "gioitinh='nu'");
            tbNK14TH.Text       = ThongKeBUS.DemNhanKhauThuongTru("nhankhauthuongtru.madinhdanh", cbbThoiGian.SelectedValue.ToString(), "YEAR(CURDATE())-YEAR(ngaysinh)>=14");

            tbHoKoTH.Text         = ThongKeBUS.DemSoHoKhau("sohokhau.sosohokhau", cbbThoiGian.SelectedValue.ToString(), false);
            tbNhanKhauKoTH.Text   = ThongKeBUS.DemNhanKhauThuongTru("nhankhauthuongtru.madinhdanh", cbbThoiGian.SelectedValue.ToString(), "", false);
            tbNKThanhThiKoTH.Text = ThongKeBUS.DemNhanKhauThuongTru("nhankhauthuongtru.madinhdanh", cbbThoiGian.SelectedValue.ToString(), "noithuongtru not like '%xã%'", false);
            tbNKNuKoTH.Text       = ThongKeBUS.DemNhanKhauThuongTru("nhankhauthuongtru.madinhdanh", cbbThoiGian.SelectedValue.ToString(), "gioitinh='nu'", false);
            tbNK14KoTH.Text       = ThongKeBUS.DemNhanKhauThuongTru("nhankhauthuongtru.madinhdanh", cbbThoiGian.SelectedValue.ToString(), "YEAR(CURDATE())-YEAR(ngaysinh)>=14", false);

            tbHoTT.Text         = ThongKeBUS.DemSoTamTru("sotamtru.sosotamtru", cbbThoiGian.SelectedValue.ToString());
            tbNhanKhauTT.Text   = ThongKeBUS.DemNhanKhauTamTru("nhankhautamtru.madinhdanh", cbbThoiGian.SelectedValue.ToString());
            tbNKThanhThiTT.Text = ThongKeBUS.DemNhanKhauTamTru("nhankhautamtru.madinhdanh", cbbThoiGian.SelectedValue.ToString(), "noithuongtru not like '%xã%'");
            tbNKNuTT.Text       = ThongKeBUS.DemNhanKhauTamTru("nhankhautamtru.madinhdanh", cbbThoiGian.SelectedValue.ToString(), "gioitinh='nu'");
            tbNK14TT.Text       = ThongKeBUS.DemNhanKhauTamTru("nhankhautamtru.madinhdanh", cbbThoiGian.SelectedValue.ToString(), "YEAR(CURDATE())-YEAR(ngaysinh)>=14");

            tbHoKoTT.Text         = ThongKeBUS.DemSoTamTru("sotamtru.sosotamtru", cbbThoiGian.SelectedValue.ToString(), false);
            tbNhanKhauKoTT.Text   = ThongKeBUS.DemNhanKhauTamTru("nhankhautamtru.madinhdanh", cbbThoiGian.SelectedValue.ToString(), "", false);
            tbNKThanhThiKoTT.Text = ThongKeBUS.DemNhanKhauTamTru("nhankhautamtru.madinhdanh", cbbThoiGian.SelectedValue.ToString(), "noithuongtru not like '%xã%'", false);
            tbNKNuKoTT.Text       = ThongKeBUS.DemNhanKhauTamTru("nhankhautamtru.madinhdanh", cbbThoiGian.SelectedValue.ToString(), "gioitinh='nu'", false);
            tbNK14KoTT.Text       = ThongKeBUS.DemNhanKhauTamTru("nhankhautamtru.madinhdanh", cbbThoiGian.SelectedValue.ToString(), "YEAR(CURDATE())-YEAR(ngaysinh)>=14", false);
        }
示例#2
0
        private void FilGVDanhSachHoatDong()
        {
            ThongKeBUS tkBUS = new ThongKeBUS();

            gvDanhSachHoatDong.DataSource = tkBUS.LayDanhSach();
            gvDanhSachHoatDong.DataBind();
        }
示例#3
0
        protected void gvDanhSachHoatDong_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            ThongKeBUS tkBUS = new ThongKeBUS();
            TableCell  cell  = gvDanhSachHoatDong.Rows[e.RowIndex].Cells[0];

            tkBUS.XoaHoatDong(Convert.ToInt32(cell.Text));
            FilGVDanhSachHoatDong();
        }
示例#4
0
        protected void btn_Them_Click(object sender, EventArgs e)
        {
            ThongKeDTO tkDTO = new ThongKeDTO();

            tkDTO.TenHoatDong = tbTenHD.Text;
            tkDTO.ChiPhi      = (float)Convert.ToDouble(tbChiPhi.Text);

            ThongKeBUS tkBUS = new ThongKeBUS();

            tkBUS.ThemHoatDong(tkDTO);
            FilGVDanhSachHoatDong();
        }
示例#5
0
    public void ThongKeMonAn()
    {
        // Xử lý request

        /*
         * int pageSize = 10;
         * if (Request["results"] != null)
         *  pageSize = int.Parse((string)Request["results"]);
         *
         * int pageNum = 1;
         * if (Request["startIndex"] != null)
         *  pageNum = (int.Parse((string)Request["startIndex"]) / pageSize) + 1;
         */

        int      mamon       = int.Parse(Request["mamon"]);
        String   hinhthuc    = Request["hinhthuc"];
        DateTime ngaybatdau  = DateTime.Parse(Request["ngaybatdau"].ToString());
        DateTime ngayketthuc = DateTime.Parse(Request["ngayketthuc"].ToString());

        ThongKeBUS bus   = new ThongKeBUS();
        ArrayList  arrKq = bus.ThongKeMonAn(mamon, hinhthuc, ngaybatdau, ngayketthuc);

        XL_THE        Kq         = new XL_THE("DANH_SACH");
        XL_THUOC_TINH Thuoc_tinh = new XL_THUOC_TINH("totalRecords", arrKq.Count.ToString());

        Kq.Danh_sach_thuoc_tinh.Add(Thuoc_tinh);

        foreach (ThongKeItem tk in arrKq)
        {
            XL_THE the = new XL_THE("Record");

            Thuoc_tinh = new XL_THUOC_TINH("NgayBatDau", tk.NgayBatDau.ToShortDateString());
            the.Danh_sach_thuoc_tinh.Add(Thuoc_tinh);

            Thuoc_tinh = new XL_THUOC_TINH("NgayKetThuc", tk.NgayKetThuc.ToShortDateString());
            the.Danh_sach_thuoc_tinh.Add(Thuoc_tinh);

            Thuoc_tinh = new XL_THUOC_TINH("SoLuongBan", tk.SoLuongBan.ToString());
            the.Danh_sach_thuoc_tinh.Add(Thuoc_tinh);

            Kq.Danh_sach_the.Add(the);
        }

        XL_CHUOI.XuatXML(Response, Kq.Chuoi());
    }
 public frmBaoCaoXuatKho()
 {
     InitializeComponent();
     this.thongKeBUS = ThongKeBUSImpl.Instance;
 }
示例#7
0
 public frmBaoCaoHoaDonBanHang()
 {
     InitializeComponent();
     this.thongKeBUS = ThongKeBUSImpl.Instance;
 }
 public frm_CR_BaoCaoXuatKho(string fromDate, string toDate) : this()
 {
     this.fromDate   = fromDate;
     this.toDate     = toDate;
     this.thongKeBUS = ThongKeBUSImpl.Instance;
 }
 public frm_CR_BaoCaoChiTietBanHang(string fromDate, string toDate) : this()
 {
     this.fromDate   = fromDate;
     this.toDate     = toDate;
     this.thongKeBUS = ThongKeBUSImpl.Instance;
 }
示例#10
0
 public frmBaoCaoChiTietNhapHang()
 {
     InitializeComponent();
     this.thongKeBUS = ThongKeBUSImpl.Instance;
 }