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

            if (rowsCount > 0)
            {
                MobileSoft.Model.Order.Tb_Order_BusCar model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model          = new MobileSoft.Model.Order.Tb_Order_BusCar();
                    model.BusCarID = dt.Rows[n]["BusCarID"].ToString();
                    //model.BusCustID=dt.Rows[n]["BusCustID"].ToString();
                    //model.BusReleaseID=dt.Rows[n]["BusReleaseID"].ToString();
                    //model.BusBussId=dt.Rows[n]["BusBussId"].ToString();
                    if (dt.Rows[n]["Created"].ToString() != "")
                    {
                        model.Created = DateTime.Parse(dt.Rows[n]["Created"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Beispiel #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.Order.Tb_Order_BusCar model)
 {
     dal.Update(model);
 }
Beispiel #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(MobileSoft.Model.Order.Tb_Order_BusCar model)
 {
     dal.Add(model);
 }