Beispiel #1
0
        public FormMain(FormLogin login)
        {
            hh      = new hhFormAdd(this);
            nv      = new nvFormAdd(this);
            kh      = new khFormAdd(this);
            ncc     = new nccFormAdd(this);
            pn      = new pnFormAdd(this);
            hd      = new hdFormAdd(this);
            hhEdit  = new hhFormEdit(this);
            nvEdit  = new nvFormEdit(this);
            nccEdit = new nccFormEdit(this);
            khEdit  = new khFormEdit(this);
            hdEdit  = new hdFormEdit(this);
            //pnEdit = new pnFormEdit(this);

            if (_spService == null)
            {
                _spService = new SanPhamService(new ModelStateWrapper(this.ModelState));
            }
            if (_nvService == null)
            {
                _nvService = new NhanVienService(new ModelStateWrapper(this.ModelState));
            }
            if (_nccService == null)
            {
                _nccService = new NhaCungCapService(new ModelStateWrapper(this.ModelState));
            }
            if (_khService == null)
            {
                _khService = new KhachHangService(new ModelStateWrapper(this.ModelState));
            }
            if (_hdService == null)
            {
                _hdService = new HoaDonService(new ModelStateWrapper(this.ModelState));
            }
            if (_pnService == null)
            {
                _pnService = new PhieuNhapService(new ModelStateWrapper(this.ModelState));
            }
            InitializeComponent();
            InitData();
            InitControls();
            this.login = login;
            this.login.Hide();
        }
Beispiel #2
0
 public DialogToGetInfo(pnFormAdd pn)
 {
     InitializeComponent();
     InitDataForPN();
     _pn = pn;
 }