Exemplo n.º 1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <NoName.NetShop.Model.OrderChangeLogModel> GetModelList(string strWhere)
        {
            DataSet ds = dal.GetList(strWhere);
            List <NoName.NetShop.Model.OrderChangeLogModel> modelList = new List <NoName.NetShop.Model.OrderChangeLogModel>();
            int rowsCount = ds.Tables[0].Rows.Count;

            if (rowsCount > 0)
            {
                NoName.NetShop.Model.OrderChangeLogModel model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new NoName.NetShop.Model.OrderChangeLogModel();
                    if (ds.Tables[0].Rows[n]["OrderId"].ToString() != "")
                    {
                        model.OrderId = int.Parse(ds.Tables[0].Rows[n]["OrderId"].ToString());
                    }
                    if (ds.Tables[0].Rows[n]["ChangeTime"].ToString() != "")
                    {
                        model.ChangeTime = DateTime.Parse(ds.Tables[0].Rows[n]["ChangeTime"].ToString());
                    }
                    model.Remark   = ds.Tables[0].Rows[n]["Remark"].ToString();
                    model.Operator = ds.Tables[0].Rows[n]["Operator"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(NoName.NetShop.Model.OrderChangeLogModel model)
 {
     dal.Add(model);
 }
Exemplo n.º 3
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(NoName.NetShop.Model.OrderChangeLogModel model)
 {
     dal.Update(model);
 }
 /// <summary>
 /// ��������б�
 /// </summary>
 public List<NoName.NetShop.Model.OrderChangeLogModel> GetModelList(string strWhere)
 {
     DataSet ds = dal.GetList(strWhere);
     List<NoName.NetShop.Model.OrderChangeLogModel> modelList = new List<NoName.NetShop.Model.OrderChangeLogModel>();
     int rowsCount = ds.Tables[0].Rows.Count;
     if (rowsCount > 0)
     {
         NoName.NetShop.Model.OrderChangeLogModel model;
         for (int n = 0; n < rowsCount; n++)
         {
             model = new NoName.NetShop.Model.OrderChangeLogModel();
             if(ds.Tables[0].Rows[n]["OrderId"].ToString()!="")
             {
                 model.OrderId=int.Parse(ds.Tables[0].Rows[n]["OrderId"].ToString());
             }
             if(ds.Tables[0].Rows[n]["ChangeTime"].ToString()!="")
             {
                 model.ChangeTime=DateTime.Parse(ds.Tables[0].Rows[n]["ChangeTime"].ToString());
             }
             model.Remark=ds.Tables[0].Rows[n]["Remark"].ToString();
             model.Operator=ds.Tables[0].Rows[n]["Operator"].ToString();
             modelList.Add(model);
         }
     }
     return modelList;
 }