示例#1
0
        void getDataGiaoDichTaiChinh()
        {
            string query = @"SELECT LoaiGiaoDich.img, LoaiGiaoDich.ten_loai_gd, GiaoDichTaiChinh.ghi_chu,NguoiQuen.ten_nguoi_quen , GiaoDichTaiChinh.so_tien, GiaoDichTaiChinh.thoi_gian, VI.img, VI.ten_vi
                                FROM GiaoDichTaiChinh, VI, LoaiGiaoDich, NguoiQuen
                                WHERE GiaoDichTaiChinh.ma_vi = VI.ma_vi
                                AND GiaoDichTaiChinh.ma_loai_gd = LoaiGiaoDich.ma_loai_gd
                                AND GiaoDichTaiChinh.ma_nguoi_quen = NguoiQuen.ma_nguoi_quen
                                AND GiaoDichTaiChinh.ma_giao_dich = " + id_giaodich + "";
            string imgGiaoDich = "", tenGiaoDich = "", moTa = "", tenNguoiQuen = "", soTien = "", thoiGian = "", imgVi = "", tenVi = "";

            DB.conn.Open();
            SqlCommand    cmd = new SqlCommand(query, DB.conn);
            SqlDataReader rd  = cmd.ExecuteReader();

            while (rd.Read())
            {
                imgGiaoDich  = rd[0].ToString();
                tenGiaoDich  = rd[1].ToString();
                moTa         = rd[2].ToString();
                tenNguoiQuen = rd[3].ToString();
                soTien       = rd[4].ToString();
                thoiGian     = rd[5].ToString();
                imgVi        = rd[6].ToString();
                tenVi        = rd[7].ToString();
            }
            DB.conn.Close();
            pbImgGiaoDich.Image = Commom.getImage(imgGiaoDich);
            lbTenGiaoDich.Text  = tenGiaoDich;
            lbDescription.Text  = moTa + " (" + tenNguoiQuen + ")";
            lbMoney.Text        = Commom.getMoneyStr(soTien);
            string[] l = thoiGian.Split(' ');
            lbTime.Text   = l[0];
            pbImgVi.Image = Commom.getImage(imgVi);
            lbTenVi.Text  = tenVi;
        }
示例#2
0
        void getImageViTien()
        {
            string name_img = ((CWallet)cbbVi.SelectedItem).Img;

            pbVi.Image = Commom.getImage(name_img);
            string type_money = ((CWallet)cbbVi.SelectedItem).Type;

            if (type_money == "VND")
            {
                pbSoTien.Image = Commom.getImage("vnd.PNG");
            }
            else
            {
                pbSoTien.Image = Commom.getImage("usd.PNG");
            }
        }
示例#3
0
        void getImageViTien()
        {
            string name_img = ((CWallet)cbbVi.SelectedItem).Img;

            pbVi.Image = Commom.getImage(name_img);
            string type_money = ((CWallet)cbbVi.SelectedItem).Type;

            if (type_money == "VND")
            {
                pbTypeMoney.Image = Commom.getImage("vnd.PNG");
            }
            else
            {
                pbTypeMoney.Image = Commom.getImage("usd.PNG");
            }

            lbNameWallet.Text = ((CWallet)cbbVi.SelectedItem).Name;
            lbMoney.Text      = Commom.getMoneyStr(((CWallet)cbbVi.SelectedItem).Money) + ((CWallet)cbbVi.SelectedItem).Type;
        }
示例#4
0
        void getDataGiaoDichTaiSan()
        {
            string query = @"SELECT LoaiGiaoDich.img, LoaiGiaoDich.ten_loai_gd, GiaoDichTaiSan.ghi_chu, TaiSan.ten_tai_san, (GiaoDichTaiSan.so_luong * TaiSan.tri_gia), GiaoDichTaiSan.thoi_gian, VI.img, VI.ten_vi, GiaoDichTaiSan.so_luong
                                FROM GiaoDichTaiSan, VI, LoaiGiaoDich, TaiSan
                                WHERE GiaoDichTaiSan.ma_vi = VI.ma_vi
                                AND GiaoDichTaiSan.ma_loai_gd = LoaiGiaoDich.ma_loai_gd
                                AND GiaoDichTaiSan.ma_tai_san = TaiSan.ma_tai_san
                                AND GiaoDichTaiSan.ma_giao_dich = " + id_giaodich + "";
            string imgGiaoDich = "", tenGiaoDich = "", moTa = "", tenTaiSan = "", soTien = "", thoiGian = "", imgVi = "", tenVi = "", soLuong = "";

            DB.conn.Open();
            SqlCommand    cmd = new SqlCommand(query, DB.conn);
            SqlDataReader rd  = cmd.ExecuteReader();

            while (rd.Read())
            {
                imgGiaoDich = rd[0].ToString();
                tenGiaoDich = rd[1].ToString();
                moTa        = rd[2].ToString();
                tenTaiSan   = rd[3].ToString();
                soTien      = rd[4].ToString();
                thoiGian    = rd[5].ToString();
                imgVi       = rd[6].ToString();
                tenVi       = rd[7].ToString();
                soLuong     = rd[8].ToString();
            }
            DB.conn.Close();
            pbImgGiaoDich.Image = Commom.getImage(imgGiaoDich);
            lbTenGiaoDich.Text  = tenGiaoDich;
            string[] l = soLuong.Split('.');


            lbDescription.Text = moTa + " (" + l[0] + "*" + tenTaiSan + ")";
            lbMoney.Text       = Commom.getMoneyStr(soTien);
            l             = thoiGian.Split(' ');
            lbTime.Text   = l[0];
            pbImgVi.Image = Commom.getImage(imgVi);
            lbTenVi.Text  = tenVi;
        }
示例#5
0
        void getImageLoaiGiaoDich()
        {
            string name_img = ((CLoaiGiaoDich)cbbLoaiGiaoDich.SelectedItem).Img;

            pbLoaiGiaoDich.Image = Commom.getImage(name_img);
        }
示例#6
0
        void getImageViTien()
        {
            string name_img = ((CWallet)cbbVi.SelectedItem).Img;

            pbVi.Image = Commom.getImage(name_img);
        }