Beispiel #1
0
        private void frm_ThongTinChiTiet_Load(object sender, EventArgs e)
        {
            BL.bl_ThongTinChiTiet bl = new BL.bl_ThongTinChiTiet();
            var model = bl.GetKhachHang(Common.Constants.id_KhachHang);

            lblHoTen.Text   = model.ho;
            lblDiaChi.Text  = model.diachi;
            lblSDT.Text     = model.sdt;
            lblDiaChi.Text  = model.diachi;
            lblNamSinh.Text = model.ten;

            var modelDetails = bl.GetChiTiet(Common.Constants.id);

            lblSoPhong.Text = modelDetails.tongsophong.ToString();
            lblSoTang.Text  = modelDetails.solau.ToString();
            lblKhach.Text   = modelDetails.sophongkhach.ToString();
            lblNgu.Text     = modelDetails.sophongngu.ToString();
            lblVS.Text      = modelDetails.sophongvesinh.ToString();
            lblBep.Text     = modelDetails.sophongbep.ToString();

            var x      = new  BL.bl_TuVan();
            var ImageA = x.HinhAnh(Common.Constants.id);

            pictureBox1.Image = byteArrayToImage(ImageA[0].hinhanh);
            pictureBox2.Image = byteArrayToImage(ImageA[1].hinhanh);
            pictureBox3.Image = byteArrayToImage(ImageA[2].hinhanh);
        }
Beispiel #2
0
        private void gv_Result_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            var index = (int)gv_Result.Rows[e.RowIndex].Cells[0].Value;

            Common.Constants.id = index;
            var ImageA = bl.HinhAnh(index);

            pictureBox1.Image = byteArrayToImage(ImageA[0].hinhanh);
            pictureBox2.Image = byteArrayToImage(ImageA[1].hinhanh);
            pictureBox3.Image = byteArrayToImage(ImageA[2].hinhanh);

            var chiTiet = bl.ChiPhi(index);

            lblGach.Text   = chiTiet[0].gach.ToString() + " thiên";
            lblGachOp.Text = chiTiet[0].gachlot.ToString() + " thùng";
            lblSon.Text    = chiTiet[0].son.ToString() + " thùng";
            lblXi.Text     = chiTiet[0].xi.ToString() + " bao";
            lblChiPhi.Text = chiTiet[0].uoctinhchiphi.ToString() + "triệu đồng";
        }