Beispiel #1
0
        /// <summary>
        /// 取得所有组织信息
        /// </summary>
        /// <returns></returns>
        public IList <OrganizationInfo> GetOrgList()
        {
            DataSet ds = dal.GetOrgList();
            List <OrganizationInfo> orgList = new List <OrganizationInfo>();

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    OrganizationInfo info = new OrganizationInfo();
                    info.ID             = new Guid(dr["ID"].ToString());
                    info.OrgName        = dr["OrgName"].ToString();
                    info.OrgCode        = dr["OrgCode"].ToString();
                    info.OrgDescription = dr["OrgDescription"].ToString();
                    info.State          = int.Parse(dr["State"].ToString());
                    info.CreatedOn      = DateTime.Parse(dr["CreatedOn"].ToString());
                    info.CreatedBy      = dr["CreatedBy"].ToString();
                    orgList.Add(info);
                }
            }
            return(orgList);
        }