예제 #1
0
        public FieldDetail()
        {
            InitializeComponent();

            _cropDataContext = new CropDataContext();
            _regionDataContext = new RegionDataContext();
            _service = new FieldService();
            _fieldDataAccessLayer = new FieldDataAccessLayer();
            _fieldCropDataAccessLayer = new FieldCropDataAccessLayer();
            _fieldSuveryResult = new FieldSurveyResult();
            App.RegionalCultureOverride = Thread.CurrentThread.CurrentCulture = new CultureInfo("zh-CN");
            App.UICultureOverride = Thread.CurrentThread.CurrentUICulture = new CultureInfo("zh-CN");
        }
예제 #2
0
 public FieldCreator()
 {
     InitializeComponent();
     ((PivotItem)bodyPiv.Items[0]).Header = "基本信息";
     _guid = new Guid();
     _cropDataContext = new CropDataContext();
     _regionDataContext = new RegionDataContext();
     _fieldSuveryResult = new FieldSurveyResult();
     _regionDataContext.GetAllRegions((data) =>
     {
         _regionData = data;
         esRegion.DataContext = new ExpanderSelectorDataContext(_regionData.ToList<object>());
         _service = new FieldService();
         _fieldDataAccessLayer = new FieldDataAccessLayer();
         _field = new Field();
         _fieldCropList = new List<FieldCrop>();
     });
     App.RegionalCultureOverride = Thread.CurrentThread.CurrentCulture = new CultureInfo("zh-CN");
     App.UICultureOverride = Thread.CurrentThread.CurrentUICulture = new CultureInfo("zh-CN");
 }