예제 #1
0
 private void InitData()
 {
     ModelState  = new ModelStateDictionary();
     _spService  = new SanPhamService(new ModelStateWrapper(this.ModelState));
     _nvService  = new NhanVienService(new ModelStateWrapper(this.ModelState));
     _nccService = new NhaCungCapService(new ModelStateWrapper(this.ModelState));
     _khService  = new KhachHangService(new ModelStateWrapper(this.ModelState));
     _hdService  = new HoaDonService(new ModelStateWrapper(this.ModelState));
     _pnService  = new PhieuNhapService(new ModelStateWrapper(this.ModelState));
 }
예제 #2
0
 public AdminController(ISanPhamService sanPhamService, IDonHangService donHangService, INhaCungCapService nhaCungCapService, INhaSanXuatService nhaSanXuatService, IThongSoService thongSoService, IAnhSanPhamService anh, IThongSoKiThuatService thongSoKiThuatService)
 {
     _spService   = sanPhamService;
     _dhService   = donHangService;
     _nccService  = nhaCungCapService;
     _nsxService  = nhaSanXuatService;
     _tsService   = thongSoService;
     _aspService  = anh;
     _tsktService = thongSoKiThuatService;
 }
예제 #3
0
 public nccFormEdit(FormMain main)
 {
     if (_nccService == null)
     {
         _nccService = new NhaCungCapService(new ModelStateWrapper(this.ModelState));
     }
     InitializeComponent();
     InitData();
     _main = main;
 }
예제 #4
0
 public PhieuNhapController(
     INhaCungCapService nccService,
     ISanPhamService spService,
     IPhieuNhapService pnService,
     IChiTietPhieuNhapService ctpnService
     )
 {
     this._nccService  = nccService;
     this._spService   = spService;
     this._pnService   = pnService;
     this._ctpnService = ctpnService;
 }
예제 #5
0
 public SanPhamController(
     INhaCungCapService nccService,
     INhaSanXuatService nsxService,
     ILoaiSanPhamService lspService,
     ISanPhamService spService
     )
 {
     this._nccService = nccService;
     this._nsxService = nsxService;
     this._lspService = lspService;
     this._spService  = spService;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="HoaDonNhapController" /> class.
        /// </summary>
        /// <param name="hoaDonNhapService">The hoa don nhap service.</param>
        /// <param name="theLoaiService">The loai service.</param>
        /// <param name="kichCoService">The kich co service.</param>
        /// <param name="chatLieuService">The chat lieu service.</param>
        /// <param name="mauService">The mau service.</param>
        /// <param name="muaService">The mua service.</param>
        /// <param name="doiTuongService">The doi tuong service.</param>
        /// <param name="nuocSxService">The nuoc sx service.</param>
        public HoaDonNhapController(IHoaDonNhapService hoaDonNhapService, ITheLoaiService theLoaiService, IKichCoService kichCoService, IChatLieuService chatLieuService, IMauService mauService, IMuaService muaService, IDoiTuongService doiTuongService, INuocSanXuatService nuocSxService, ISanPhamService sanPhamService, IChiTietHDNService chiTietHdnService, INhanVienService nhanVienService, INhaCungCapService nhaCungCapService)
        {
            this.hoaDonNhapService = hoaDonNhapService;
            this.theLoaiService    = theLoaiService;
            this.kichCoService     = kichCoService;
            this.chatLieuService   = chatLieuService;
            this.mauService        = mauService;
            this.muaService        = muaService;
            this.doiTuongService   = doiTuongService;
            this.nuocSxService     = nuocSxService;
            this.sanPhamService    = sanPhamService;
            this.chiTietHdnService = chiTietHdnService;
            this.nhanVienService   = nhanVienService;
            this.nhaCungCapService = nhaCungCapService;

            hoaDonNhapView = new HoaDonNhapView(this);
        }
예제 #7
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();
        }
예제 #8
0
 private void InitData()
 {
     ModelState  = new ModelStateDictionary();
     _nccService = new NhaCungCapService(new ModelStateWrapper(this.ModelState));
 }
예제 #9
0
 public nccFormEdit(INhaCungCapService nccService) : this()
 {
     _nccService = nccService;
 }
예제 #10
0
 public NhaCungCapController(INhaCungCapService service)
 {
     _service = service;
 }
예제 #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NhaCungCapController"/> class.
 /// </summary>
 /// <param name="chatLieuService">The chat lieu service.</param>
 public NhaCungCapController(INhaCungCapService chatLieuService)
 {
     this.chatLieuService = chatLieuService;
     view = new NhaCungCapView(this);
 }
예제 #12
0
 public FormMain(INhaCungCapService nccService) : this()
 {
     _nccService = nccService;
 }
예제 #13
0
 public NhaCungCapController(INhaCungCapService _nhaCungCap)
 {
     nhaCungCap = _nhaCungCap;
 }