/// <summary>
        /// 获得数据列表
        /// </summary>
        public List <MobileSoft.Model.OAPublicWork.Tb_OAPublicWork_BuyPlanCheckDetail> DataTableToList(DataTable dt)
        {
            List <MobileSoft.Model.OAPublicWork.Tb_OAPublicWork_BuyPlanCheckDetail> modelList = new List <MobileSoft.Model.OAPublicWork.Tb_OAPublicWork_BuyPlanCheckDetail>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                MobileSoft.Model.OAPublicWork.Tb_OAPublicWork_BuyPlanCheckDetail model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new MobileSoft.Model.OAPublicWork.Tb_OAPublicWork_BuyPlanCheckDetail();
                    if (dt.Rows[n]["InfoId"].ToString() != "")
                    {
                        model.InfoId = int.Parse(dt.Rows[n]["InfoId"].ToString());
                    }
                    if (dt.Rows[n]["Tb_OAPublicWork_BuyPlanCheck_InfoId"].ToString() != "")
                    {
                        model.Tb_OAPublicWork_BuyPlanCheck_InfoId = int.Parse(dt.Rows[n]["Tb_OAPublicWork_BuyPlanCheck_InfoId"].ToString());
                    }
                    if (dt.Rows[n]["Num"].ToString() != "")
                    {
                        model.Num = int.Parse(dt.Rows[n]["Num"].ToString());
                    }
                    model.SubjectName = dt.Rows[n]["SubjectName"].ToString();
                    model.SubjectType = dt.Rows[n]["SubjectType"].ToString();
                    if (dt.Rows[n]["BuyPlanMoney"].ToString() != "")
                    {
                        model.BuyPlanMoney = decimal.Parse(dt.Rows[n]["BuyPlanMoney"].ToString());
                    }
                    if (dt.Rows[n]["HowMany"].ToString() != "")
                    {
                        model.HowMany = decimal.Parse(dt.Rows[n]["HowMany"].ToString());
                    }
                    if (dt.Rows[n]["NeedDate"].ToString() != "")
                    {
                        model.NeedDate = DateTime.Parse(dt.Rows[n]["NeedDate"].ToString());
                    }
                    model.HowUse = dt.Rows[n]["HowUse"].ToString();
                    model.Mark   = dt.Rows[n]["Mark"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.OAPublicWork.Tb_OAPublicWork_BuyPlanCheckDetail model)
 {
     dal.Update(model);
 }
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(MobileSoft.Model.OAPublicWork.Tb_OAPublicWork_BuyPlanCheckDetail model)
 {
     return(dal.Add(model));
 }