Beispiel #1
0
 public KnowledgeAddForm()
 {
     InitializeComponent();
     DataSet ds_level = null;
     AccountAdd aa = new AccountAdd();
     ds_level = aa.CreateDataSet_FaultLevel();//故障模式列表
     InitComboBox(combo_level, ds_level, "id", "level_name");
 }
Beispiel #2
0
 public FaultAddForm(string eqasset, string eqname, string eqdep, string eqId)
 {
     InitializeComponent();
     text_eqasset.Text = eqasset;
     text_eqname.Text = eqname;
     text_dep.Text = eqdep;
     globalEqId = eqId;
     //
     DataSet ds_level = null;
     AccountAdd aa = new AccountAdd();
     ds_level = aa.CreateDataSet_FaultLevel();//故障模式列表
     InitComboBox(combo_level, ds_level, "id", "level_name");
 }
Beispiel #3
0
 public KnowledgeEditForm(string id)
 {
     InitializeComponent();
     globalId = id;
     DataSet ds_level = null, ds = null;
     AccountAdd aa = new AccountAdd();
     Account acc = new Account();
     ds_level = aa.CreateDataSet_FaultLevel();//故障模式列表
     ds = acc.queryKnowledgeByIdForEdit(id);
     //InitComboBox(combo_level, ds_level, "id", "level_name");
     text_eqname.DataBindings.Add(new Binding("Text", ds.Tables[0], "eq_name"));
     text_partname.DataBindings.Add(new Binding("Text", ds.Tables[0], "part_name"));
     richText_fault_process.DataBindings.Add(new Binding("Text", ds.Tables[0], "fault_process"));
     richText_fault_reason.DataBindings.Add(new Binding("Text", ds.Tables[0], "fault_reason"));
     richText_countermeasure.DataBindings.Add(new Binding("Text", ds.Tables[0], "countermeasure"));
     InitComboBox(combo_level, ds_level, "id", "level_name", ds, "fault_level");
 }
Beispiel #4
0
        public FaultEditForm(string faultId)
        {
            InitializeComponent();
            globalFaultId = faultId;
            //
            DataSet ds_level = null, ds = null;
            AccountAdd aa = new AccountAdd();
            Account acc = new Account();
            ds_level = aa.CreateDataSet_FaultLevel();//故障模式列表
            ds = acc.queryFaultById(faultId);

            text_eqasset.DataBindings.Add(new Binding("Text", ds.Tables[0], "asset"));
            text_eqname.DataBindings.Add(new Binding("Text", ds.Tables[0], "eqname"));
            text_dep.DataBindings.Add(new Binding("Text", ds.Tables[0], "departname"));
            text_partname.DataBindings.Add(new Binding("Text", ds.Tables[0], "part_name"));
            dateTime_fault.DataBindings.Add(new Binding("Value", ds.Tables[0], "fault_date"));
            dateTime_begin.DataBindings.Add(new Binding("Value", ds.Tables[0], "repair_date"));
            dateTime_end.DataBindings.Add(new Binding("Value", ds.Tables[0], "repairover_date"));
            richText_fault_process.DataBindings.Add(new Binding("Text", ds.Tables[0], "fault_process"));
            richText_fault_reason.DataBindings.Add(new Binding("Text", ds.Tables[0], "fault_reason"));
            richText_countermeasure.DataBindings.Add(new Binding("Text", ds.Tables[0], "countermeasure"));
            InitComboBox(combo_level, ds_level, "id", "level_name", ds, "fault_level");
            img = (byte[])(ds.Tables[0]).Rows[0][12];
        }