/// <summary> /// 获得数据列表 /// </summary> public List <Maticsoft.Model.tb_KuWei> DataTableToList(DataTable dt) { List <Maticsoft.Model.tb_KuWei> modelList = new List <Maticsoft.Model.tb_KuWei>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { Maticsoft.Model.tb_KuWei model; for (int n = 0; n < rowsCount; n++) { model = new Maticsoft.Model.tb_KuWei(); model.KuWeiName = dt.Rows[n]["KuWeiName"].ToString(); model.X = dt.Rows[n]["X"].ToString(); model.Y = dt.Rows[n]["Y"].ToString(); model.Z = dt.Rows[n]["Z"].ToString(); model.Precision = dt.Rows[n]["Precision"].ToString(); modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public bool UpdateRead(Maticsoft.Model.tb_KuWei model) { return(dal.UpdateRead(model)); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(Maticsoft.Model.tb_KuWei model) { dal.Add(model); }