Exemple #1
0
        private void Record_Click(object sender, RoutedEventArgs e) //录入处理 按键事件
        {
            if (Rec_info.站名 == "" || Rec_info.站名 == null)
            {
                Valid_Ani va = new Valid_Ani();
                Ani_zn.BeginAnimation(SolidColorBrush.ColorProperty, va.color_Ani);
                Re_zn.GotFocus += Ani_Valid_gotFoc;
                return;
            }

            if (Rec_info.设备名称 == null || Rec_info.设备名称 == string.Empty)
            {
                Valid_Ani vd = new Valid_Ani();
                Ani_eqName.BeginAnimation(SolidColorBrush.ColorProperty, vd.color_Ani);
                Re_eq.GotFocus += Ani_Valid_gotFoc;
                return;
            }
            if (Rec_info.存在问题 == null || Rec_info.存在问题 == string.Empty)
            {
                Valid_Ani vc = new Valid_Ani();
                Ani_eqFault.BeginAnimation(SolidColorBrush.ColorProperty, vc.color_Ani);
                Re_eqfault.GotFocus += Ani_Valid_gotFoc;
                return;
            }
            if (Rec_info.发现时间 == null)
            {
                Valid_Ani vb = new Valid_Ani();
                dptx.Background.BeginAnimation(SolidColorBrush.ColorProperty, vb.color_Ani);
                dptx.GotFocus += PART_TextBox_GotFocus;
                return;
            }
            if (eq_name_count > 0 && Rec_info.销记 == false) //更新
            {
                wt_update();
            }
            else
            {
                wt_insert_new();
            }

            //GridUpdate("wt");
            AllWT = myFuc.LoadWts();
            mainGrid.ItemsSource = AllWT;

            init_zhname.ItemsSource = (from g in AllWT select g.站名).Distinct();
            init_unit.ItemsSource   = (from f in AllWT select f.受理单位).Distinct();
            Re_zn.ItemsSource       = (from g in AllWT select g.站名).Distinct();
            //插入或更新后, 全局记录器 重置!
            g_wt_info_rec.Re_reset(Rec_info.站名);
            Rec_info = g_wt_info_rec.getWtRec();

            Re_rows.DataContext = null;
            Re_rows.DataContext = Rec_info;

            edit_tips.Content    = "存在问题";
            edit_tips.Foreground = new SolidColorBrush(Colors.Black);
        }
Exemple #2
0
 private void All_init() //系统初始化...
 {
     this.init_zhname.ItemsSource = (from g in AllWT select g.站名).Distinct();
     this.init_unit.ItemsSource   = (from f in AllWT select f.受理单位).Distinct();
     this.Re_zn.ItemsSource       = (from g in AllWT select g.站名).Distinct();
     this.pfSelect.ItemsSource    = (from g in AllPF
                                     orderby g.派发日期 descending
                                     select g.派发日期).Distinct();
     this.tzdSelect.ItemsSource = (from g in AllTZD
                                   orderby g.派单日期 descending
                                   select g.派单日期).Distinct();
     pfTreeInit();
     TzdTreeInit();
     //--- 查询初始
     list_zn     = AllWT;
     list_dowith = AllWT;
     list_merge  = AllWT;
     list_unit   = AllWT;
     //输入界面 绑定初始化...
     Rec_info            = g_wt_info_rec.getWtRec(); //数据点 记录器...
     Re_rows.DataContext = Rec_info;                 //
 }
Exemple #3
0
 public void Re_reset(string zn)
 {
     _Rec_info    = new wtReInfo();
     _Rec_info.站名 = zn;
 }
Exemple #4
0
 public storeWtRec()
 {
     _Rec_info          = new wtReInfo();
     _Rec_info.销记       = false;
     _Rec_info.lastEdit = myFuc.getNowDateHashcode();
 }