public InventoryOutsHeader() { pro = new Repositories.ProductRepository(); invs = new Repositories.InventoryRepository(); type = new Repositories.InventoryOutsTypeRepository(); invh = new Repositories.InventoryOutsHeaderRepository(); invd = new Repositories.InventoryOutsDeatilRepository(); ProCat = new Repositories.ProductCategoryRepository(); InitializeComponent(); }
public ListDeatil(int id, int IsOut) { InitializeComponent(); this.Id = id; this.IsOut = IsOut; pro = new Repositories.ProductRepository(); inv = new Repositories.InventoryRepository(); ind = new Repositories.InventoryInsDeatilRepository(); inh = new Repositories.InventoryInsHeaderRepository(); outd = new Repositories.InventoryOutsDeatilRepository(); outh = new Repositories.InventoryOutsHeaderRepository(); inT = new Repositories.InventoryInsTypeRepository(); outT = new Repositories.InventoryOutsTypeRepository(); }
public InventoryOutsDeatilRepositoryTests() { 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; _InventoryOutsDeatil = new Repositories.InventoryOutsDeatilRepository(); EInventoryOutsDeatil = new Entities.InventoryOutsDeatil() { InventoryOutsHeaderId = 1, ProductId = 1, Amount = 1, }; }