示例#1
0
        private void WindowBase_Loaded(object sender, RoutedEventArgs e)
        {
            // IEnumerable<FixtureFurnaceMainEntity> Main = (new FixtureFurnaceMainDB()).GetAllData();


            this.Accomplish.ItemsSource  = YesOrNoType.Yes.ToArrayList();
            this.cmbFFDState.ItemsSource = FFDState.NoFixtureOpen.ToArrayList();
            this.cmbCAI.ItemsSource      = (new ChuckingApplianceInfoDB()).GetAll().ToList().OrderBy(x => x.CAId);

            if (operateType == 1)
            {
                this.Title = "添加信息";
            }
            else
            {
                YesOrNoType yesOrNo = (YesOrNoType)Convert.ToInt32(Model.FFDIsAccomplish);
                Accomplish.Text = yesOrNo.FetchDescription();


                FFDState FFDState = (FFDState)Convert.ToInt32(Model.FFDState);
                cmbFFDState.Text = FFDState.FetchDescription();


                this.Title = "修改信息";
                // this.Model = new FixtureFurnaceDetaiViewModel();
            }
            this.DataContext = this.Model;
        }
 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     if (value != null)
     {
         FFDState ffdState = (FFDState)value;
         return(ffdState.FetchDescription());
     }
     return(string.Empty);
 }