public void Update() { DGR.ItemsSource = null; CB_People.ItemsSource = null; CB_ReportPeople.ItemsSource = null; using (var db = new ResourceModel()) { DGR.ItemsSource = db.GetResource(); CB_People.ItemsSource = db.GetPeople(); CB_ReportPeople.ItemsSource = db.GetPeople(); } }
public void Update() { DGR.ItemsSource = null; CB_WorkingGroup.ItemsSource = null; CB_People.ItemsSource = null; using (var db = new ResourceModel()) { DGR.ItemsSource = db.GetComputer(); CB_WorkingGroup.ItemsSource = db.GetWorking_Group(); CB_People.ItemsSource = db.GetPeople(); } }
public void Update() { DGR.ItemsSource = null; CB_Department.ItemsSource = null; CB_Organization.ItemsSource = null; CB_Position.ItemsSource = null; using (var db = new ResourceModel()) { DGR.ItemsSource = db.GetPeople(); CB_Department.ItemsSource = db.GetDepartment(); CB_Organization.ItemsSource = db.GetOrganization(); CB_Position.ItemsSource = db.GetPosition(); } }
private void Update() { List <OperatorModel> models = new List <OperatorModel>(); DGR.ItemsSource = null; using (var db = new ResourceModel()) { foreach (var op in db.GetOperator()) { if (op.UserStatus != "user") { models.Add(new OperatorModel() { OperatorID = op.OperatorID, Login = op.Login, Password = op.Password, People = op.People, PeopleID = op.PeopleID, UserStatus = op.UserStatus.Remove(op.UserStatus.Length - 1) }); } else { models.Add(new OperatorModel() { OperatorID = op.OperatorID, Login = op.Login, Password = op.Password, People = op.People, PeopleID = op.PeopleID, UserStatus = op.UserStatus }); } } DGR.ItemsSource = models; CB_People.ItemsSource = db.GetPeople(); } }
private void SearchOperator_Click(object sender, RoutedEventArgs e) { List <OperatorModel> models = new List <OperatorModel>(); using (var db = new ResourceModel()) { foreach (var op in db.SearchOperator(TB_Login.Text, CB_Status.Text)) { if (op.UserStatus != "user") { models.Add(new OperatorModel() { OperatorID = op.OperatorID, Login = op.Login, Password = op.Password, People = op.People, PeopleID = op.PeopleID, UserStatus = op.UserStatus.Remove(op.UserStatus.Length - 1) }); } else { models.Add(new OperatorModel() { OperatorID = op.OperatorID, Login = op.Login, Password = op.Password, People = op.People, PeopleID = op.PeopleID, UserStatus = op.UserStatus }); } } DGR.ItemsSource = models; CB_People.ItemsSource = db.GetPeople(); } }