示例#1
0
 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();
 }
示例#2
0
        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();
        }
示例#3
0
        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,
            };
        }