コード例 #1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Maticsoft.Model.tb_DingDian> DataTableToList(DataTable dt)
        {
            List <Maticsoft.Model.tb_DingDian> modelList = new List <Maticsoft.Model.tb_DingDian>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                Maticsoft.Model.tb_DingDian model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new Maticsoft.Model.tb_DingDian();
                    model.DingDianName = dt.Rows[n]["DingDianName"].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);
        }
コード例 #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool UpdateRead(Maticsoft.Model.tb_DingDian model)
 {
     return(dal.UpdateRead(model));
 }
コード例 #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void  Add(Maticsoft.Model.tb_DingDian model)
 {
     dal.Add(model);
 }