示例#1
0
 public RepairEditForm(string eqasset, string eqname, string eqdep, string repairId)
 {
     InitializeComponent();
     text_eqasset.Text = eqasset;
     text_eqname.Text = eqname;
     text_dep.Text = eqdep;
     globalRepairId = repairId;
     //
     DataSet ds_department1 = null, ds_department2 = null, ds_level = null, ds = null;
     AccountAdd aa = new AccountAdd();
     Account ads = new Account();
     ds_department1 = aa.CreateDataSet_Department();//部门列表
     ds_department2 = aa.CreateDataSet_Department();//部门列表
     ds_level = aa.CreateDataSet_RepairLevel();//维修级别列表
     ds = ads.queryRepairById(repairId);
     //
     InitComboBox(combo_targetdep, ds_department1, "id", "departname", ds, "target_department");
     InitComboBox(combo_sourcedep, ds_department2, "id", "departname", ds, "source_department");
     InitComboBox(combo_level, ds_level, "id", "level_name", ds, "repair_level");
     //表头塞值
     text_repairasset.DataBindings.Add(new Binding("Text", ds.Tables[0], "repair_asset"));
     dateTime_startdate.DataBindings.Add(new Binding("Value", ds.Tables[0], "start_date"));
     dateTime_enddate.DataBindings.Add(new Binding("Value", ds.Tables[0], "end_date"));
     numeric_stopday.DataBindings.Add(new Binding("Value", ds.Tables[0], "stop_time"));
     text_group.DataBindings.Add(new Binding("Text", ds.Tables[0], "repair_group"));
     text_fuzeren.DataBindings.Add(new Binding("Text", ds.Tables[0], "principal"));
     richText_before.DataBindings.Add(new Binding("Text", ds.Tables[0], "memo_before"));
     richText_record.DataBindings.Add(new Binding("Text", ds.Tables[0], "memo_record"));
     richText_after.DataBindings.Add(new Binding("Text", ds.Tables[0], "memo_after"));
 }
示例#2
0
 public RepairPlanEditForm(string planId)
 {
     InitializeComponent();
     globalPlanId = planId;
     //
     DataSet ds_department1 = null, ds_department2 = null, ds_level = null, ds = null;
     AccountAdd aa = new AccountAdd();
     Account ads = new Account();
     //初始化下拉列表
     ds_department1 = aa.CreateDataSet_Department();//部门列表
     ds_department2 = aa.CreateDataSet_Department();//部门列表
     ds_level = aa.CreateDataSet_RepairLevel();//维修级别列表
     ds = ads.queryRepairPlanById(planId);
     InitComboBox(combo_targetdep, ds_department1, "id", "departname", ds, "target_department");
     InitComboBox(combo_sourcedep, ds_department2, "id", "departname", ds, "source_department");
     InitComboBox(combo_level, ds_level, "id", "level_name", ds, "level_id");
     //表头塞值
     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_repairasset.DataBindings.Add(new Binding("Text", ds.Tables[0], "plan_asset"));
     dateTime_plandate.DataBindings.Add(new Binding("Value", ds.Tables[0], "start_date"));
     numeric_repairday.DataBindings.Add(new Binding("Value", ds.Tables[0], "over_time"));
     numeric_stopday.DataBindings.Add(new Binding("Value", ds.Tables[0], "stop_time"));
     text_fuzeren.DataBindings.Add(new Binding("Text", ds.Tables[0], "principal"));
     richText_memo.DataBindings.Add(new Binding("Text", ds.Tables[0], "memo"));
 }
示例#3
0
 public RepairPlanAddForm(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_department1 = null, ds_department2 = null, ds_level = null;
     AccountAdd aa = new AccountAdd();
     ds_department1 = aa.CreateDataSet_Department();//部门列表
     ds_department2 = aa.CreateDataSet_Department();//部门列表
     ds_level = aa.CreateDataSet_RepairLevel();//维修级别列表
     InitComboBox(combo_targetdep, ds_department1, "id", "departname");
     InitComboBox(combo_sourcedep, ds_department2, "id", "departname");
     InitComboBox(combo_level, ds_level, "id", "level_name");
 }