Beispiel #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"));
 }
Beispiel #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"));
 }
Beispiel #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");
 }
Beispiel #4
0
 private void AccountAddForm_Load(object sender, EventArgs e)
 {
     DataSet ds_eqType = null, ds_department = null, ds_Status=null ;
     AccountAdd aa = new AccountAdd();
     ds_eqType = aa.CreateDataSet_EquipmentType();
     ds_department = aa.CreateDataSet_Department();
     ds_Status = aa.CreateDataSet_Status();
     InitComboBox(combo_eqType, ds_eqType, "id", "type_name");
     InitComboBox(combo_depart, ds_department, "id", "departname");
     InitComboBox(combo_status, ds_Status, "id", "status_name");
 }
Beispiel #5
0
 public AccountEditForm(string id)
 {
     InitializeComponent();
     accountId = id;
     DataSet ds_eqType = null, ds_department = null, ds_Status = null;
     DataSet ds = null;
        // DataTable data = null;
     AccountAdd aa = new AccountAdd();
     Account ads = new Account();
     //初始化下拉列表用
     ds_eqType = aa.CreateDataSet_EquipmentType();
     ds_department = aa.CreateDataSet_Department();
     ds_Status = aa.CreateDataSet_Status();
     //获取指定id的信息
     ds = ads.queryAccountById(id);
     //ds2.Tables[0].Rows[0][]
     //log.Debug("设备类型是:"+ds.Tables[0].Rows[0][19].ToString());
     InitComboBox(combo_eqType, ds_eqType, "id", "type_name",ds,"type");
     InitComboBox(combo_depart, ds_department, "id", "departname",ds,"department");
     InitComboBox(combo_status, ds_Status, "id", "status_name",ds ,"status");
     text_asset.DataBindings.Add(new Binding("Text", ds.Tables[0], "asset"));
     text_eqname.DataBindings.Add(new Binding("Text",ds.Tables[0],"eqname"));
     text_model.DataBindings.Add(new Binding("Text", ds.Tables[0], "model"));
     text_specification.DataBindings.Add(new Binding("Text", ds.Tables[0], "specification"));
     text_weight.DataBindings.Add(new Binding("Text", ds.Tables[0], "weight"));
     text_brand.DataBindings.Add(new Binding("Text", ds.Tables[0], "brand"));
     text_manufacturer.DataBindings.Add(new Binding("Text", ds.Tables[0], "manufacturer"));
     text_supplier.DataBindings.Add(new Binding("Text", ds.Tables[0], "supplier"));
     maskedText_value.DataBindings.Add(new Binding("Value", ds.Tables[0], "value"));
     numeric_count.DataBindings.Add(new Binding("Value", ds.Tables[0], "count"));
     numeric_electromotor.DataBindings.Add(new Binding("Value", ds.Tables[0], "electromotor"));
     maskedText_power.DataBindings.Add(new Binding("Value", ds.Tables[0], "power"));
     dateTime_manu_date.DataBindings.Add(new Binding("Value", ds.Tables[0], "manu_date"));
     dateTime_produ_date.DataBindings.Add(new Binding("Value", ds.Tables[0], "produ_date"));
     dateTime_filing_date.DataBindings.Add(new Binding("Value", ds.Tables[0], "filing_date"));
     text_address.DataBindings.Add(new Binding("Text", ds.Tables[0], "address"));
     img = (byte[])(ds.Tables[0]).Rows[0][21];
     threeD = (byte[])(ds.Tables[0]).Rows[0][22];
 }