Пример #1
0
 public Editor(RepositortAbstracts.IProductCategory catrepo, RepositortAbstracts.IProductUnit unit, RepositortAbstracts.IProductParameter paramsRepo, RepositortAbstracts.IProductParameterValue Pvalue)
 {
     this.catrepo    = catrepo;
     this.unit       = unit;
     this.Pvalue     = Pvalue;
     this.paramsRepo = paramsRepo;
     _OldParameterId = Entity.ProductCategoryId;
 }
Пример #2
0
 public InventoryInsHeader()
 {
     pro    = new Repositories.ProductRepository();
     invs   = new Repositories.InventoryRepository();
     type   = new Repositories.InventoryInsTypeRepository();
     invh   = new Repositories.InventoryInsHeaderRepository();
     invd   = new Repositories.InventoryInsDeatilRepository();
     ProCat = new Repositories.ProductCategoryRepository();
     InitializeComponent();
 }
        public ProductCategoryRepositoryTests()
        {
            var contaxt     = new DataLayer.InventoryDBContext();
            var relateduser = contaxt.Users.FirstOrDefault(u => u.Username.Equals("admin"));
            var identity    = new GenericIdentity(relateduser.Username);
            var roles       = relateduser.Roles.Select(p => p.Title).ToArray();
            var principal   = new GenericPrincipal(identity, roles);

            System.Threading.Thread.CurrentPrincipal = principal;

            procat  = new ProductCategoryRepository();
            Eprocat = new Entities.ProductCategory()
            {
                SubProductCategoryID = 0,
                InventoryId          = 1,
                Title       = "Title",
                Description = "Description",
                Capacity    = 1,
            };
        }