Пример #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (isEdit)
            {
                tbTitle.Text = "编辑" + testItem.TestName;
            }
            else
            {
                testItem.TestStartDate = testItem.TestEndDate = DateTime.Now.ToString("yyyy/MM/dd");
            }
            Binding b = new Binding()
            {
                Source = testItem
            };

            grid.SetBinding(Grid.DataContextProperty, b);
            testManagerBLL = new BLL.TB_TestManager();
        }
Пример #2
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     if (isEdit)
     {
         tbTitle.Text = "编辑" + testItem.TestName;
     }
     else {
         testItem.TestStartDate = testItem.TestEndDate = DateTime.Now.ToString("yyyy/MM/dd");
     }
     Binding b = new Binding() { Source = testItem };
     grid.SetBinding(Grid.DataContextProperty, b);
     testManagerBLL = new BLL.TB_TestManager();
 }