private void Window_Loaded(object sender, RoutedEventArgs e) { standTestRefeBLL = new BLL.TB_StandTestRefe(); testInfoBLL = new BLL.TB_TestInfo(); athleteBLL = new BLL.TB_AthleteInfo(); standPramsBLL = new BLL.TB_StandardParams(); standParam = standPramsBLL.GetModelByStandID(StandInfo.ID); parentStandParam = standPramsBLL.GetModelByStandID((int)StandInfo.Stand_ParentID); tbTitle.Text += " 当前测试参考值为:" + StandInfo.Stand_Name; }
private void init() { Binding dictBind = new Binding() { Source = jointDictList }; cbJoint.SetBinding(ComboBox.ItemsSourceProperty, dictBind); cbJointSide.SetBinding(ComboBox.ItemsSourceProperty, new Binding() { Source = jointsideDictList }); cbTestMode.SetBinding(ComboBox.ItemsSourceProperty, new Binding() { Source = testmodeDictList }); cbPlane.SetBinding(ComboBox.ItemsSourceProperty, new Binding() { Source = planeDictList }); if (!isAdd) { tbTitle.Text = "编辑" + StandardInfo.Stand_Name; standardParam = standardParamsBLL.GetModelByStandID(StandardInfo.ID); if (standardParam == null) { standardParam = new Model.TB_StandardParams(); standardParam.StandID = StandardInfo.ID; } txtName.Text = StandardInfo.Stand_Name; } else { standardParam = new Model.TB_StandardParams(); if (StandardInfo.Stand_Level == -1) { tbTitle.Text = "添加测试参考值类别"; } else { tbTitle.Text = "为" + StandardInfo.Stand_Name + "添加子参考值"; } txtName.Text = ""; } Binding standParamBind = new Binding() { Source = standardParam }; grid.SetBinding(Grid.DataContextProperty, standParamBind); txtName.Focus(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { standTestRefeBLL = new BLL.TB_StandTestRefe(); testInfoBLL = new BLL.TB_TestInfo(); athleteBLL = new BLL.TB_AthleteInfo(); standPramsBLL = new BLL.TB_StandardParams(); standParam = standPramsBLL.GetModelByStandID(StandInfo.ID); parentStandParam = standPramsBLL.GetModelByStandID((int)StandInfo.Stand_ParentID); tbTitle.Text +=" 当前测试参考值为:" +StandInfo.Stand_Name; }