/// <summary> /// 获得数据列表 /// </summary> public List <JumbotOA.Entity.UserEntity> GetModelList(string strWhere) { DataSet ds = dal.GetList(strWhere); List <JumbotOA.Entity.UserEntity> modelList = new List <JumbotOA.Entity.UserEntity>(); int rowsCount = ds.Tables[0].Rows.Count; if (rowsCount > 0) { JumbotOA.Entity.UserEntity model; for (int n = 0; n < rowsCount; n++) { model = new JumbotOA.Entity.UserEntity(); if (ds.Tables[0].Rows[n]["Uid"].ToString() != "") { model.Uid = int.Parse(ds.Tables[0].Rows[n]["Uid"].ToString()); } if (ds.Tables[0].Rows[n]["Pid"].ToString() != "") { model.Pid = int.Parse(ds.Tables[0].Rows[n]["Pid"].ToString()); } model.Uname = ds.Tables[0].Rows[n]["Uname"].ToString(); model.Upwd = ds.Tables[0].Rows[n]["Upwd"].ToString(); model.Uipaddress = ds.Tables[0].Rows[n]["Uipaddress"].ToString(); model.Setting = ds.Tables[0].Rows[n]["Setting"].ToString(); modelList.Add(model); } } return(modelList); }
/// <summary> /// ��������б� /// </summary> public List<JumbotOA.Entity.UserEntity> GetModelList(string strWhere) { DataSet ds = dal.GetList(strWhere); List<JumbotOA.Entity.UserEntity> modelList = new List<JumbotOA.Entity.UserEntity>(); int rowsCount = ds.Tables[0].Rows.Count; if (rowsCount > 0) { JumbotOA.Entity.UserEntity model; for (int n = 0; n < rowsCount; n++) { model = new JumbotOA.Entity.UserEntity(); if (ds.Tables[0].Rows[n]["Uid"].ToString() != "") { model.Uid = int.Parse(ds.Tables[0].Rows[n]["Uid"].ToString()); } if (ds.Tables[0].Rows[n]["Pid"].ToString() != "") { model.Pid = int.Parse(ds.Tables[0].Rows[n]["Pid"].ToString()); } model.Uname = ds.Tables[0].Rows[n]["Uname"].ToString(); model.Upwd = ds.Tables[0].Rows[n]["Upwd"].ToString(); model.Uipaddress = ds.Tables[0].Rows[n]["Uipaddress"].ToString(); model.Setting = ds.Tables[0].Rows[n]["Setting"].ToString(); modelList.Add(model); } } return modelList; }