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

            if (rowsCount > 0)
            {
                MobileSoft.Model.OL.Tb_OL_AlipayOrder model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model    = new MobileSoft.Model.OL.Tb_OL_AlipayOrder();
                    model.Id = dt.Rows[n]["Id"].ToString();
                    if (dt.Rows[n]["CommID"].ToString() != "")
                    {
                        model.CommID = int.Parse(dt.Rows[n]["CommID"].ToString());
                    }
                    model.CommunityId = dt.Rows[n]["CommunityId"].ToString();
                    //model.CustId=dt.Rows[n]["CustId"].ToString();
                    model.partner      = dt.Rows[n]["partner"].ToString();
                    model.out_trade_no = dt.Rows[n]["out_trade_no"].ToString();
                    model.prepay_str   = dt.Rows[n]["prepay_str"].ToString();
                    model.txnTime      = dt.Rows[n]["txnTime"].ToString();
                    model.trade_status = dt.Rows[n]["trade_status"].ToString();
                    model.trade_msg    = dt.Rows[n]["trade_msg"].ToString();
                    if (dt.Rows[n]["IsSucc"].ToString() != "")
                    {
                        model.IsSucc = int.Parse(dt.Rows[n]["IsSucc"].ToString());
                    }
                    model.Memo = dt.Rows[n]["Memo"].ToString();
                    if (dt.Rows[n]["IsDelete"].ToString() != "")
                    {
                        model.IsDelete = int.Parse(dt.Rows[n]["IsDelete"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
示例#2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.OL.Tb_OL_AlipayOrder model)
 {
     dal.Update(model);
 }
示例#3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(MobileSoft.Model.OL.Tb_OL_AlipayOrder model)
 {
     dal.Add(model);
 }