private void loadData()//動態參考 { List <WorkModel> workModels = _workManager.GetNonFinishWork(int.Parse(DefineSeting.LoginStepNo)); dgvInser(workModels); CustomerManager cm = new CustomerManager(); _customers = cm.GetAll(); }
private void loadData() { _currentWorkModel = _workManager.GetNonFinishWork(int.Parse(DefineSeting.LoginStepNo)); dgvInser(_currentWorkModel); }
private void loadData() { List <WorkModel> workModels = new List <WorkModel>(); if (_status == "未完成" | _status == "全部") { workModels.AddRange(_workManager.GetNonFinishWork()); foreach (WorkModel item in workModels) { item.Status = "未完成"; } } if (_status == "完成" | _status == "全部") { workModels.AddRange(_workManager.GetFinishWork()); foreach (WorkModel item in workModels) { if (item.Status == "") { item.Status = "完成"; } } } if (_workNumber != "") { workModels = workModels.FindAll(x => x.WorkNumber.Contains(_workNumber)); } if (_customName != "") { workModels = workModels.FindAll(x => x.CustomName.Contains(_customName)); } if (_step != "") { workModels = workModels.FindAll(x => x.CustomName.Contains(_customName)); } if (_type != "") { workModels = workModels.FindAll(x => x.AddDegree.Contains(_type)); } if (_create != "") { workModels = workModels.FindAll(x => x.CreateMan.Contains(_create)); } workModels = workModels.OrderBy(x => x.WorkCreateDate).ToList(); dgvInser(workModels); int con; con = workModels.Count; tbxnom.Text = Convert.ToString(con); }