Beispiel #1
0
        private void Set_UI()
        {
            cbb_Loai.DataSource    = LoaiSP_Data.Get_LoaiSpList();
            cbb_Loai.ValueMember   = "id_LoaiSP";
            cbb_Loai.DisplayMember = "name_LoaiSP";

            cbb_BaoHanh.DataSource    = BaoHanh_Data.Get_BaoHanhList();
            cbb_BaoHanh.DisplayMember = "lim_BaoHanh";
            cbb_BaoHanh.ValueMember   = "id_BaoHanh";

            cbb_Hang.DataSource    = HangSX_Data.Get_HangSXList();
            cbb_Hang.ValueMember   = "id_HangSX";
            cbb_Hang.DisplayMember = "name_HangSX";

            DanhMuc danhMuc = DanhMuc_Data.Get_DanhMuc(this.id);

            edt_Ma.Text               = danhMuc.id_DanhMuc;
            edt_Ten.Text              = danhMuc.name_DanhMuc;
            edt_PhanhSau.Text         = danhMuc.breakend_DanhMuc;
            edt_PhanhTruoc.Text       = danhMuc.breakfont_DanhMuc;
            edt_DongCo.Text           = danhMuc.engine_DanhMuc;
            edt_KichThuoc.Text        = danhMuc.size_DanhMuc;
            edt_Gia.Text              = danhMuc.price_DanhMuc.ToString();
            edt_DungTich.Text         = danhMuc.volume_DanhMuc;
            edt_LoaiLop.Text          = danhMuc.tire_DanhMuc;
            edt_Momen.Text            = danhMuc.torque_DanhMuc;
            edt_KhoiLuong.Text        = danhMuc.weight_DanhMuc.ToString();
            ptb_HinhAnh.Image         = ImageConvert.ConvertBinaryToImage(danhMuc.image_DanhMuc);
            cbb_Loai.SelectedValue    = danhMuc.id_LoaiSP;
            cbb_Hang.SelectedValue    = danhMuc.id_HangSX;
            cbb_BaoHanh.SelectedValue = danhMuc.id_BaoHanh;
        }
Beispiel #2
0
        private void Add_DanhMuc_Load(object sender, EventArgs e)
        {
            this.edt_Ma.Text = Create_ID.Gennaral_ID(Data_Entity.DanhMuc_Data.Get_IdDanhMuc());

            cbb_Loai.DataSource    = LoaiSP_Data.Get_LoaiSpList();
            cbb_Loai.ValueMember   = "id_LoaiSP";
            cbb_Loai.DisplayMember = "name_LoaiSP";

            cbb_BaoHanh.DataSource    = BaoHanh_Data.Get_BaoHanhList();
            cbb_BaoHanh.DisplayMember = "lim_BaoHanh";
            cbb_BaoHanh.ValueMember   = "id_BaoHanh";

            cbb_Hang.DataSource    = HangSX_Data.Get_HangSXList();
            cbb_Hang.ValueMember   = "id_HangSX";
            cbb_Hang.DisplayMember = "name_HangSX";

            cbb_BaoHanh.SelectedIndex = cbb_Hang.SelectedIndex = cbb_Loai.SelectedIndex = 0;
        }