public static List <ATTOrganization> GetAllOrganization(int?orgID, string orgType, string orgEquCode) { List <ATTOrganization> lstOrg = new List <ATTOrganization>(); try { foreach (DataRow row in DLLOrganization.GetAllOrganization(orgID, orgType, orgEquCode).Rows) { ATTOrganization obj = new ATTOrganization(); obj.OrgSubType = row["ORG_SUB_TYPE"].ToString(); obj.OrgID = int.Parse(row["org_id"].ToString()); // obj.ParentId = int.Parse(row["PARENT_ID"].ToString()); obj.OrgType = row["org_type"].ToString(); obj.OrgName = row["ORG_NAME"].ToString(); //obj.OrgAddress = row["ORG_ADDRESS"].ToString(); //obj.OrgStreetName = row["ORG_STREET_NAME"].ToString(); //obj.OrgVdcMuni = int.Parse(row["ORG_VDC_MUNI"].ToString()); //obj.OrgUrl = row["ORG_URL"].ToString(); //obj.OrgWardNo = int.Parse(row["ORG_WARD_NO"].ToString()); //obj.OrgDistrict = int.Parse(row["ORG_DIST"].ToString()); obj.OrgEquCodes = row["ORG_EQU_CODE"].ToString(); lstOrg.Add(obj); } return(lstOrg); } catch (Exception ex) { throw ex; } }
public static List <ATTOrganization> GetOrganizationByID(int OrgID, int orgDV) { try { return(GetOrganizationList(DLLOrganization.GetOrganizationByID(OrgID), orgDV)); } catch (Exception ex) { throw ex; } }
public static List <ATTOrganization> GetOrgWithChilds(int orgID) { List <ATTOrganization> lst = new List <ATTOrganization>(); try { foreach (DataRow row in DLLOrganization.GetOrgWithChilds(orgID).Rows) { ATTOrganization OrgObj = new ATTOrganization(); OrgObj.OrgID = int.Parse(row["ORG_ID"].ToString()); OrgObj.OrgName = (string)row["ORG_NAME"]; OrgObj.OrgEquCode = ((row["ORG_EQU_CODE"] == System.DBNull.Value) ? 0 : int.Parse(row["ORG_EQU_CODE"].ToString())); OrgObj.LSTOrgUnit = BLLOrganizationUnit.GetOrganizationUnits(OrgObj.OrgID, null); lst.Add(OrgObj); } return(lst); } catch (Exception ex) { throw ex; } }
public static List <ATTOrganization> GetOrganizationNameList(string searchValue) { List <ATTOrganization> lstOrgName = new List <ATTOrganization>(); try { foreach (DataRow row in DLLOrganization.GetOrganization(searchValue).Rows) { ATTOrganization OrgObj = new ATTOrganization ( int.Parse(row["org_id"].ToString()), row["org_name"].ToString() ); lstOrgName.Add(OrgObj); } return(lstOrgName); } catch (Exception ex) { throw ex; } }