예제 #1
0
 public InventoryViewModel()
 {
     InventoryItems  = new BindableCollection <InventoryModel>(Read.Inventory());
     ClassOnes       = new BindableCollection <string>(Read.Dropdown("InventoryClassOne"));
     ClassTwos       = new BindableCollection <string>(Read.Dropdown("InventoryClassTwo"));
     QuantityTypes   = new BindableCollection <string>(Read.Dropdown("InventoryQuantityType"));
     universalHelper = new UniversalHelper();
 }
예제 #2
0
 public UnitViewModel()
 {
     ProgressOfUnits = new BindableCollection <UnitProgressModel>(Read.UnitProgress());
     Units           = new BindableCollection <UnitModel>(Read.Units());
     UnitNames       = new BindableCollection <string>(Read.Dropdown("Unit"));
     UnitTypes       = new BindableCollection <string>(Read.Dropdown("UnitType"));
     UnitStatuses    = new BindableCollection <string>(Read.Dropdown("UnitStatus"));
     RightSideUP     = false;
     universalHelper = new UniversalHelper();
 }
예제 #3
0
        public dynamic IndexAction(RecentBlogPostsBindingModel input, string tag = "")
        {
            var model = UniversalHelper.Project(input, BlogPosts, tag);

            if (!model.Posts.Any())
            {
                return(input.Page > 1 ? HttpStatusCode.NotFound : Response.AsText("Just1n尚未发表任何文章!", "text/html; charset=utf-8"));
            }
            ViewBag.Tag = tag;
            return(View["index", model]);
        }
예제 #4
0
 public SupplierViewModel()
 {
     Suppliers       = new BindableCollection <SupplierModel>(Read.Suppliers());
     universalHelper = new UniversalHelper();
 }
예제 #5
0
 public UserViewModel()
 {
     Users           = new BindableCollection <UserModel>(Read.Users());
     universalHelper = new UniversalHelper();
 }
예제 #6
0
 public EmployeeViewModel()
 {
     Employees       = new BindableCollection <EmployeeModel>(Read.Employees());
     Positions       = new BindableCollection <string>(Read.Dropdown("EmployeePosition"));
     universalHelper = new UniversalHelper();
 }
예제 #7
0
 public void ReFetchPosts()
 {
     BlogPosts = UniversalHelper.FetchPosts(true);
 }
예제 #8
0
 static BaseModule()
 {
     BlogPosts = UniversalHelper.FetchPosts();
 }