/// <summary> /// /// 初始化整个表格 /// </summary> private void initdgv() { this.del_list.Clear(); Maticsoft.BLL.measures use1 = new Maticsoft.BLL.measures(); string aa = string.Format("componentId = '{0}'ORDER BY step", LjHao);//ORDER BY step DataSet ds = use1.GetListByPage3(aa, "", 0, 100); dgv.DataSource = ds.Tables[0]; foreach (DataGridViewRow row in dgv.Rows) { row.Cells["step"].Value = row.Index + 1; } Maticsoft.BLL.component mea_bll = new Maticsoft.BLL.component(); Maticsoft.Model.component comp_mode = mea_bll.GetModel(Convert.ToInt32(LjHao)); if (comp_mode != null) { Task a_task = new Task(new Action(() => { Thread.Sleep(1000); renderView.Invoke(new Action(() => { string base_dir = Environment.CurrentDirectory; base_dir += "\\shumo\\"; base_dir += comp_mode.sm; IgesReader reader = new IgesReader(); bool ret = reader.Read(base_dir, new CadView(this.renderView)); Console.WriteLine("ret ====== " + ret); renderView.FitAll(); renderView.RequestDraw(); })); })); a_task.Start(); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Maticsoft.Model.component model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(Maticsoft.Model.component model) { return(dal.Add(model)); }