Exemplo n.º 1
0
        public void pictureBox8_Click(object sender, EventArgs e)
        {
            DTO_HoaDon dichvu = new DTO_HoaDon();

            dichvu.TenDichVu   = "Bánh Mì";
            dichvu.MaHD        = mahd;
            dichvu.MaChiNhanh  = machinhanh;
            dichvu.MaPhong     = maphong;
            dichvu.SoDienThoai = sdt;
            int DongCuoi = dgvHienThi.Rows.Count - 2;
            int STT      = int.Parse(dgvHienThi.Rows[DongCuoi].Cells["STT"].Value.ToString()) + 1;

            dichvu.STT                    = STT;
            dichvu.MaDV                   = "TA_BANHMI";
            dichvu.SoLuong                = soluong;
            dichvu.ThanhTien              = soluong * 20000;
            dichvu.NgayDatPhong           = DateTime.Now.ToShortDateString();
            dichvu.NgayTraPhong           = DateTime.Now.ToShortDateString();
            dichvu.DapUng                 = "No";
            dichvu.DatCoc                 = "Yes";
            dichvu.ThoiGianThucHienHoaDon = DateTime.Now;
            BO_ChiTietPhong them = new BO_ChiTietPhong();

            them.ThemDV(dichvu);
            HienThi();
        }
Exemplo n.º 2
0
        public void pictureBox14_Click(object sender, EventArgs e)
        {
            SoLuong number = new SoLuong();

            number.DonVi("Ngay");
            number.ShowDialog();
            number.soluong(ref soluong);
            if (soluong == 0)
            {
            }
            else
            {
                DTO_HoaDon dichvu = new DTO_HoaDon();
                dichvu.TenDichVu   = "LapTop";
                dichvu.MaHD        = mahd;
                dichvu.MaChiNhanh  = machinhanh;
                dichvu.MaPhong     = maphong;
                dichvu.SoDienThoai = sdt;
                int DongCuoi = dgvHienThi.Rows.Count - 2;
                int STT      = int.Parse(dgvHienThi.Rows[DongCuoi].Cells["STT"].Value.ToString()) + 1;
                dichvu.STT                    = STT;
                dichvu.MaDV                   = "DVP_LAPTOP";
                dichvu.SoLuong                = soluong;
                dichvu.ThanhTien              = soluong * 70000;
                dichvu.NgayDatPhong           = DateTime.Now.ToShortDateString();
                dichvu.NgayTraPhong           = DateTime.Now.ToShortDateString();
                dichvu.DapUng                 = "No";
                dichvu.DatCoc                 = "Yes";
                dichvu.ThoiGianThucHienHoaDon = DateTime.Now;
                BO_ChiTietPhong them = new BO_ChiTietPhong();
                them.ThemDV(dichvu);
                HienThi();
            }
        }