protected void PersonRefresh(object sender, StoreRefreshDataEventArgs e) { //需要添加权限判断-判断是否为走动干部进入 //var q = dc.Person.Where(p => p.Posid == Convert.ToInt32(cbb_zhiwu.SelectedItem.Value) && p.Maindeptid == SessionBox.GetUserSession().DeptNumber); var q = from p in dc.Person where p.Posid == Convert.ToInt32(cbb_zhiwu.SelectedItem.Value) && p.Maindeptid == SessionBox.GetUserSession().DeptNumber orderby p.Name ascending select new { p.Personnumber, p.Name }; PersonStore.DataSource = q; PersonStore.DataBind(); cbb_person.Disabled = q.Count() > 0 ? false : true; }
async Task ExecuteLoadPersonCommand(bool loadAPI = false) { IsBusy = true; try { Items.Clear(); var items = await PersonStore.GetItemsAsync(true, loadAPI); foreach (var item in items) { Items.Add(item); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }
public void TearDown() { PersonStore.DELETE_ALL(); }
public void AddPerson([DataBind("Person")] Person p) { PersonStore.AddPerson(p); RedirectToAction("Index"); }
public void SetUp() { IPersonStore PersonStore = new PersonStore(); george = PersonStore.AddPerson("George", Gender.Male); mary = PersonStore.AddPerson("Mary", Gender.Female); bob = PersonStore.AddPerson("Bob", Gender.Male); sally = PersonStore.AddPerson("Sally", Gender.Female); dave = PersonStore.AddPerson("Dave", Gender.Male); davesMaternalUncle = PersonStore.AddPerson("Hulk", Gender.Male); davesPaternalAunt = PersonStore.AddPerson("Aunt", Gender.Female); davesMaternalGrandDad = PersonStore.AddPerson("Thor", Gender.Male); davesMaternalGrandMom = PersonStore.AddPerson("Wonder", Gender.Female); davesPaternalGrandDad = PersonStore.AddPerson("Thor1", Gender.Male); davesPaternalGrandMom = PersonStore.AddPerson("Wonder1", Gender.Female); amy = PersonStore.AddPerson("Amy", Gender.Female); bamy = PersonStore.AddPerson("Bamy", Gender.Female); miller = PersonStore.AddPerson("Miller", Gender.Male); amysBrother = PersonStore.AddPerson("BigB", Gender.Male); amysBrother1 = PersonStore.AddPerson("ABig", Gender.Male); amysMom = PersonStore.AddPerson("Miley", Gender.Female); amysDad = PersonStore.AddPerson("Brad", Gender.Male); FamilyGraph familyGraph = new FamilyGraph(PersonStore); //Daves Family familyGraph.AddRelationship("Thor", "Mary", "Parent"); familyGraph.AddRelationship("Wonder", "Mary", "Parent"); familyGraph.AddRelationship("Thor", "Hulk", "Parent"); familyGraph.AddRelationship("Wonder", "Hulk", "Parent"); familyGraph.AddRelationship("Thor1", "George", "Parent"); familyGraph.AddRelationship("Wonder1", "George", "Parent"); familyGraph.AddRelationship("Thor1", "Aunt", "Parent"); familyGraph.AddRelationship("Wonder1", "Aunt", "Parent"); familyGraph.AddRelationship("George", "Bob", "Parent"); familyGraph.AddRelationship("Mary", "Bob", "Parent"); familyGraph.AddRelationship("George", "Dave", "Parent"); familyGraph.AddRelationship("Mary", "Dave", "Parent"); familyGraph.AddRelationship("George", "Sally", "Parent"); familyGraph.AddRelationship("Mary", "Sally", "Parent"); //Spouse familyGraph.AddRelationship("Dave", "Amy", "Spouse"); //Amy's Family familyGraph.AddRelationship("Brad", "Miller", "Parent"); familyGraph.AddRelationship("Miley", "Miller", "Parent"); familyGraph.AddRelationship("Brad", "ABig", "Parent"); familyGraph.AddRelationship("Miley", "ABig", "Parent"); familyGraph.AddRelationship("Brad", "BigB", "Parent"); familyGraph.AddRelationship("Miley", "BigB", "Parent"); familyGraph.AddRelationship("Brad", "Amy", "Parent"); familyGraph.AddRelationship("Miley", "Amy", "Parent"); familyGraph.AddRelationship("Brad", "Bamy", "Parent"); familyGraph.AddRelationship("Miley", "Bamy", "Parent"); relationships = new Relationships(familyGraph); }
public ActionResult Image(int id) { var image = PersonStore.GetPersonImageById(id); return(BinaryResult(image.Content, image.MimeType)); }
public ActionResult Index() { var people = PersonStore.GetAllPeople(); return(View(people)); }
public PersonService(DatabaseContext context, PersonStore store, IEventDispatcher eventDispatcher) : base(context, store, eventDispatcher) { }
public void SetUp() { PersonStore.DELETE_ALL(); }
public void SetUp() { PersonStore.DELETE_ALL(); new CreatePersonCommand("Boris", "Britian").Execute(); }
public PersonController() { _dbContext = ServiceLocator.Current.GetService <IDbContext>(); _store = new PersonStore(_dbContext, "Person", "Crm"); }