예제 #1
0
 private void PartEditForm_Load(object sender, EventArgs e)
 {
     Account acc = new Account();
     DataSet ds = null;
     ds = acc.queryPartById(globleId);
     //表头塞值
     text_partasset.DataBindings.Add(new Binding("Text", ds.Tables[0], "part_asset"));
     text_partname.DataBindings.Add(new Binding("Text", ds.Tables[0], "part_name"));
     text_partmaterial.DataBindings.Add(new Binding("Text", ds.Tables[0], "material"));
     text_partweight.DataBindings.Add(new Binding("Text", ds.Tables[0], "part_weight"));
     //设置单选框
     if (ds.Tables[0].Rows[0][4].ToString() == "True")
     {
         globleStandard = true;
         InitCheckBox(globleStandard);
     }
     else
     {
         globleStandard = false;
         InitCheckBox(globleStandard);
     }
     img = (byte[])(ds.Tables[0]).Rows[0][5];
     threeD = (byte[])(ds.Tables[0]).Rows[0][6];
 }