private void DeleteDevData()
??{
???int deleteNum=0;
???//删除选中的某一行或多行记录,调用DataGrid的IsSelected(i)函数,如果函数返回结果为true,则表示该行被选中
???ArrayList arrList = new ArrayList();
???for(int i=0;i???{???
????if(dtg_BasicDataInfo.IsSelected(i)==true)
????{?
?????F_WR_Public.VO_DevSpec vo_DevSpec_Delete = new F_WR_Public.VO_DevSpec();
?????//表中第11列保存的是设备类型的主键,但没有显示在表中。
?????vo_DevSpec_Delete.devSpecID = Int64.Parse(DevSpec.Rows[i][10].ToString());
?????arrList.Add(vo_DevSpec_Delete);
?????deleteNum++;
????}
???}
???if (deleteNum !=0)
???{
????if (MessageBox.Show ("你确定要删除这些数据吗?", "删除数据",
?????MessageBoxButtons.YesNo, MessageBoxIcon.Question)== DialogResult.Yes)
????{
?????F_WR_Public.F_WR_Public f_WR_Public = new F_WR_Public.F_WR_Public();?????
?????F_WR_Public.VO_DevSpec[] arrVO_DevSpec_Delete = new F_WR_Public.VO_DevSpec[deleteNum];
?????IEnumerator ienum = arrList.GetEnumerator();
?????int deleteIndex=0;
?????while(ienum.MoveNext())
?????{
??????arrVO_DevSpec_Delete[deleteIndex] = (F_WR_Public.VO_DevSpec)ienum.Current;
??????arrVO_DevSpec_Delete[deleteIndex].col=Int64.MaxValue;
??????arrVO_DevSpec_Delete[deleteIndex].devTypeID=Int64.MaxValue;
??????arrVO_DevSpec_Delete[deleteIndex].num=Int64.MaxValue;
??????arrVO_DevSpec_Delete[deleteIndex].row=Int64.MaxValue;
??????deleteIndex++;
?????}
?????f_WR_Public.removeDevSpec(arrVO_DevSpec_Delete);
?????MessageBox.Show ("删除成功!", "删除数据",MessageBoxButtons.OK, MessageBoxIcon.Information);
????}
????else
????{
?????return;
????}
???}
???else
???{
????MessageBox.Show ("未选中所要删除的数据!", "删除数据", MessageBoxButtons.OK, MessageBoxIcon.Warning);
???}
??}
?
private void QueryDevSpec()
??{
???try
???{
????DevSpec.Clear();
????F_WR_Public.F_WR_Public f_WR_Public = new F_WR_Public.F_WR_Public();
????F_WR_Public.VO_DevSpec vo_DevSpec = new F_WR_Public.VO_DevSpec();
????vo_DevSpec.col=Int64.MaxValue;
????vo_DevSpec.devSpecID=Int64.MaxValue;
????vo_DevSpec.devTypeID=Int64.Parse(cbo_DevType.SelectedValue.ToString());
????vo_DevSpec.num=Int64.MaxValue;
????vo_DevSpec.row=Int64.MaxValue;
????F_WR_Public.VO_DevSpec[] arrVO_DevSpec=f_WR_Public.queryDevSpec(vo_DevSpec);
????if(arrVO_DevSpec!=null)
????{
?????for(int i=0;i?????{
??????F_WR_Public.VO_DevSpec vo_DevSpec_Result = arrVO_DevSpec[i];
??????DataRow myRow;
??????myRow = DevSpec.NewRow();
??????myRow["设备大类"] =DIC_DevSpec[vo_DevSpec_Result.devTypeID].displayMember.ToString();
??????myRow["规格类型"] = vo_DevSpec_Result.specType;
??????myRow["生产厂家"] = vo_DevSpec_Result.manufacturer;
??????myRow["长"] = vo_DevSpec_Result.@long;
??????myRow["宽"] = vo_DevSpec_Result.width;
??????myRow["高"] = vo_DevSpec_Result.high;
??????if ( vo_DevSpec_Result.num != Int64.MaxValue)
??????{
???????myRow["数量"] = vo_DevSpec_Result.num;
??????}
??????else
???????myRow["数量"] ="";
??????if ( vo_DevSpec_Result.row != Int64.MaxValue)
??????{
???????myRow["行"] = vo_DevSpec_Result.row;
??????}
??????else
???????myRow["行"] = "";
??????if ( vo_DevSpec_Result.col != Int64.MaxValue)
??????{
???????myRow["列"] = vo_DevSpec_Result.col;
??????}
??????else
???????myRow["列"] = "";;
??????
??????myRow["排列方式"] = vo_DevSpec_Result.disposeType;
??????myRow[&