/// <summary> /// 取得某个部门信息 /// </summary> /// <param name="id"></param> /// <returns></returns> public OrganizationInfo GetOrgByID(string id) { if (!string.IsNullOrEmpty(id)) { Guid orgId = new Guid(id); if (orgId != null) { DataSet ds = dal.GetOrgByID(orgId); 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 = orgId; info.OrgName = dr["OrgName"].ToString(); info.OrgCode = dr["OrgCode"].ToString(); info.OrgDescription = dr["OrgDescription"].ToString(); info.State = int.Parse(dr["State"].ToString()); info.OrderNo = int.Parse(dr["OrderNo"].ToString()); info.CreatedOn = DateTime.Parse(dr["CreatedOn"].ToString()); info.CreatedBy = dr["CreatedBy"].ToString(); return(info); } } } } return(null); }