public static List <mTerritory> WMGetDept(int Cmpny) { List <mTerritory> SiteLst = new List <mTerritory>(); iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient(); CustomProfile profile = CustomProfile.GetProfile(); if (profile.Personal.UserType == "Admin") { SiteLst = UCCommonFilter.GetAddedDepartmentList(Cmpny, profile.Personal.UserID, profile.DBConnection._constr).ToList(); } else { SiteLst = UCCommonFilter.GetDepartmentList(Cmpny, profile.DBConnection._constr).ToList(); } return(SiteLst); }