예제 #1
0
        public frmThemHangHoa()
        {
            InitializeComponent();

            txtMaHang.Text = HangHoaBUS.LayMaHH();
            txtMaVach.Text = HangHoaBUS.LayMaHH();

            gridlookupPhanLoaiHangHoa.Properties.DataSource    = PhanLoaiHangHoaBUS.DanhSach();
            gridlookupPhanLoaiHangHoa.Properties.DisplayMember = "TenPhanLoai";
            gridlookupPhanLoaiHangHoa.Properties.ValueMember   = "MaPhanLoai";

            gridlookupKho.Properties.DataSource    = KhoHangBUS.DanhSach();
            gridlookupKho.Properties.DisplayMember = "Ten";
            gridlookupKho.Properties.ValueMember   = "MaKho";

            gridlookupLoaiHangHoa.Properties.DataSource    = NhomHangBUS.DanhSach();
            gridlookupLoaiHangHoa.Properties.DisplayMember = "Ten";
            gridlookupLoaiHangHoa.Properties.ValueMember   = "MaNHH";

            gridlookupNCC.Properties.DataSource    = NhaCungCapBUS.DanhSach();
            gridlookupNCC.Properties.DisplayMember = "TenNCC";
            gridlookupNCC.Properties.ValueMember   = "MaNCC";

            gridlookupDonVi.Properties.DataSource    = DonViBUS.DanhSach();
            gridlookupDonVi.Properties.DisplayMember = "Ten";
            gridlookupDonVi.Properties.ValueMember   = "MaDV";
        }
예제 #2
0
 public FormDonViTinh(int themOrSua, DonViO dv)
 {
     this.themOrSua = themOrSua;
     InitializeComponent();
     donViBUS = new DonViBUS();
     DV       = dv;
 }
예제 #3
0
        //thêm
        private void button1_Click(object sender, EventArgs e)
        {
            DonViDTO DonVi = new DonViDTO();

            DonVi.TenDonVi = txtTenDonVi.Text;



            DbAck ack = DonViBUS.Insert(DonVi);

            if (ack == DbAck.Ok)
            {
                MessageBox.Show("Thêm Thành Công", "Thông báo");
            }
            else
            {
                if (ack == DbAck.Unknown)
                {
                    MessageBox.Show("Lỗi không xác định", "Thông báo");
                }
                else
                {
                }
            }
            loadListDonVi();
            txtTenDonVi.Text = null;
        }
예제 #4
0
 public FormDonViTinh()
 {
     InitializeComponent();
     themOrSua = 1;
     donViBUS  = new DonViBUS();
     DV        = new DonViO();
 }
예제 #5
0
        public void GetDonVi()
        {
            List <DonViDTO> listDonVi = DonViBUS.SelectAllDonVi();

            cbbDonVi.DisplayMember = "TenDonVi";
            cbbDonVi.ValueMember   = "TenDonVi";
            cbbDonVi.DataSource    = listDonVi;
            //dgvDanhSachThuoc.DataSource = listCachDung;
        }
예제 #6
0
 void initBUS()
 {
     hangHoaBUS    = new HangHoaBUS();
     khoBUS        = new KhoBUS();
     nhomHangBUS   = new NhomHangBUS();
     donViBUS      = new DonViBUS();
     nhaCungCapBUS = new NhaCungCapBUS();
     HH            = new HangHoaO();
 }
예제 #7
0
 void initObjectBUS()
 {
     CK                  = new ChuyenKhoO();
     CTCK                = new ChiTietChuyenKhoO();
     HH                  = new HangHoaO();
     DV                  = new DonViO();
     TK                  = new TonKhoO();
     chuyenKhoBUS        = new ChuyenKhoBUS();
     chiTietChuyenKhoBUS = new ChiTietChuyenKhoBUS();
     nhanVienBUS         = new NhanVienBUS();
     khoBUS              = new KhoBUS();
     hangHoaBUS          = new HangHoaBUS();
     donViBUS            = new DonViBUS();
     tonKhoBUS           = new TonKhoBUS();
 }
예제 #8
0
        void initObjectBUS()
        {
            MH                     = new MuaHangO();
            NCC                    = new NhaCungCapO();
            HH                     = new HangHoaO();
            DV                     = new DonViO();
            CTPMH                  = new ChiTietPhieuMuaHangO();
            TK                     = new TonKhoO();
            muaHangBUS             = new MuaHangBUS();
            nhaCungCapBUS          = new NhaCungCapBUS();
            nhanVienBUS            = new NhanVienBUS();
            khoBUS                 = new KhoBUS();
            hangHoaBUS             = new HangHoaBUS();
            donViBUS               = new DonViBUS();
            tonKhoBUS              = new TonKhoBUS();
            chiTietPhieuMuaHangBUS = new ChiTietPhieuMuaHangBUS();

            kieuThanhToanBUS     = new KieuThanhToanBUS();
            hinhThucThanhToanBUS = new HinhThucThanhToanBUS();
        }
예제 #9
0
        void initObjectBUS()
        {
            TH         = new TraHangO();
            KH         = new KhachHangO();
            HH         = new HangHoaO();
            DV         = new DonViO();
            CTTH       = new ChiTietTraHangO();
            TK         = new TonKhoO();
            traHangBUS = new TraHangBUS();

            khachHangBUS           = new KhachHangBUS();
            nhanVienBUS            = new NhanVienBUS();
            khoBUS                 = new KhoBUS();
            hangHoaBUS             = new HangHoaBUS();
            donViBUS               = new DonViBUS();
            tonKhoBUS              = new TonKhoBUS();
            chiTietPhieuTraHangBUS = new ChiTietPhieuTraHangBUS();

            kieuThanhToanBUS     = new KieuThanhToanBUS();
            hinhThucThanhToanBUS = new HinhThucThanhToanBUS();
        }
예제 #10
0
        void loadListDonVi()
        {
            List <DonViDTO> listDonVi = DonViBUS.SelectAllDonVi();

            dgvDsDonVi.DataSource = listDonVi;
        }
예제 #11
0
 public UCDonViTinh()
 {
     InitializeComponent();
     donViBUS = new DonViBUS();
     dv       = new DonViO();
 }