Пример #1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <MobileSoft.Model.OL.Tb_OL_WeiXinPayDetail> DataTableToList(DataTable dt)
        {
            List <MobileSoft.Model.OL.Tb_OL_WeiXinPayDetail> modelList = new List <MobileSoft.Model.OL.Tb_OL_WeiXinPayDetail>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                MobileSoft.Model.OL.Tb_OL_WeiXinPayDetail model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model            = new MobileSoft.Model.OL.Tb_OL_WeiXinPayDetail();
                    model.Id         = dt.Rows[n]["Id"].ToString();
                    model.PayOrderId = dt.Rows[n]["PayOrderId"].ToString();
                    //model.FeesId=dt.Rows[n]["FeesId"].ToString();
                    if (dt.Rows[n]["DueAmount"].ToString() != "")
                    {
                        model.DueAmount = decimal.Parse(dt.Rows[n]["DueAmount"].ToString());
                    }
                    if (dt.Rows[n]["LateFeeAmount"].ToString() != "")
                    {
                        model.LateFeeAmount = decimal.Parse(dt.Rows[n]["LateFeeAmount"].ToString());
                    }
                    if (dt.Rows[n]["PaidAmount"].ToString() != "")
                    {
                        model.PaidAmount = decimal.Parse(dt.Rows[n]["PaidAmount"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Пример #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.OL.Tb_OL_WeiXinPayDetail model)
 {
     dal.Update(model);
 }
Пример #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(MobileSoft.Model.OL.Tb_OL_WeiXinPayDetail model)
 {
     dal.Add(model);
 }