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

            if (rowsCount > 0)
            {
                ERM.MDL.Dict model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model             = new ERM.MDL.Dict();
                    model.DisplayName = ds.Tables[0].Rows[n]["DisplayName"].ToString();
                    if (ds.Tables[0].Rows[n]["ID"].ToString() != "")
                    {
                        model.ID = int.Parse(ds.Tables[0].Rows[n]["ID"].ToString());
                    }
                    model.KeyWord = ds.Tables[0].Rows[n]["KeyWord"].ToString();
                    if (ds.Tables[0].Rows[n]["OrderIndex"].ToString() != "")
                    {
                        model.OrderIndex = int.Parse(ds.Tables[0].Rows[n]["OrderIndex"].ToString());
                    }
                    model.ValueName = ds.Tables[0].Rows[n]["ValueName"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(ERM.MDL.Dict model)
 {
     dal.Update(model);
 }
Exemplo n.º 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(ERM.MDL.Dict model)
 {
     dal.Add(model);
 }