public ProductCategoryView()
 {
     InitializeComponent();
     SelectedItem            = new ProductCategory();
     _productCategoryService = new ProductCategoryService();
     var genericCrud = new GenericCrud <ProductCategory>(this, _productCategoryService.SaveAsync, _productCategoryService.UpdateAsync, _productCategoryService.DeleteAsync, _productCategoryService.SearchAsync)
     {
         SearchBox  = txtSearchBox,
         KeyControl = txtCategoryId
     };
 }
コード例 #2
0
 public UserRoleView()
 {
     InitializeComponent();
     _userRoleService = new UserRoleService();
     SelectedItem     = new UserRole();
     var genericCrud = new GenericCrud <UserRole>(this, _userRoleService.SaveAsync, _userRoleService.UpdateAsync, _userRoleService.DeleteAsync, _userRoleService.SearchAsync)
     {
         KeyControl = txtRoleId,
         SearchBox  = txtSearchBox
     };
 }
コード例 #3
0
 public CustomerRegistration()
 {
     InitializeComponent();
     _customerService = new CustomerService(); SelectedItem = new Models.Customer();
     var generic = new GenericCrud <Models.Customer>(this, _customerService.SaveAsync, _customerService.UpdateAsync,
                                                     _customerService.DeleteAsync, _customerService.SearchAsync)
     {
         SearchBox  = txtSearchBox,
         KeyControl = txtCustomerId
     };
 }
コード例 #4
0
 public VendorRegistrationView()
 {
     InitializeComponent();
     _vendorService = new VendorService();
     SelectedItem   = new Models.Vendor();
     var generic = new GenericCrud <Models.Vendor>(this, _vendorService.SaveAsync, _vendorService.UpdateAsync,
                                                   _vendorService.DeleteAsync, _vendorService.SearchAsync)
     {
         KeyControl = txtVendorId,
         SearchBox  = txtSearchBox
     };
 }
コード例 #5
0
 public ProductRegistrationView()
 {
     InitializeComponent();
     _productService         = new ProductService();
     _productCategoryService = new ProductCategoryService();
     SelectedItem            = new Models.Product();
     var generic = new GenericCrud <Models.Product>(this, _productService.SaveAsync,
                                                    _productService.UpdateAsync, _productService.DeleteAsync, _productService.SearchAsync)
     {
         KeyControl = txtProductId,
         SearchBox  = txtSearchBox
     };
 }
        public UserRegistrationView()
        {
            InitializeComponent();
            _service     = new UserRegistrationService();
            _roleService = new UserRoleService();
            SelectedItem = new Models.User();

            _genericCrud = new GenericCrud <Models.User>(this, _service.SaveAsync, _service.UpdateAsync,
                                                         _service.DeleteAsync, _service.SearchAsync)
            {
                KeyControl = txtUserId,
                SearchBox  = metroTextBox1
            };
        }