Ejemplo n.º 1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <MobileSoft.Model.OL.Tb_OL_AlipayDetail> DataTableToList(DataTable dt)
        {
            List <MobileSoft.Model.OL.Tb_OL_AlipayDetail> modelList = new List <MobileSoft.Model.OL.Tb_OL_AlipayDetail>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                MobileSoft.Model.OL.Tb_OL_AlipayDetail model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model            = new MobileSoft.Model.OL.Tb_OL_AlipayDetail();
                    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);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.OL.Tb_OL_AlipayDetail model)
 {
     dal.Update(model);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(MobileSoft.Model.OL.Tb_OL_AlipayDetail model)
 {
     dal.Add(model);
 }