public List <mSubZone> GetSubZoneList(long ZoneID, string[] conn) { List <mSubZone> SubZoneList = new List <mSubZone>(); BISPL_CRMDBEntities db = new BISPL_CRMDBEntities(svr.GetEntityConnection(conn)); try { SubZoneList = db.mSubZones.Where(z => z.ZoneID == ZoneID).OrderBy(z => z.SubZone).ToList(); return(SubZoneList); } catch (Exception ex) { return(SubZoneList); } finally { db.Dispose(); } }
public List <mZone> GetZoneList(string Country, string State, string[] conn) { List <mZone> ZoneList = new List <mZone>(); BISPL_CRMDBEntities db = new BISPL_CRMDBEntities(svr.GetEntityConnection(conn)); try { ZoneList = db.mZones.Where(z => z.Country == Country && z.State == State).OrderBy(z => z.Zone).ToList(); return(ZoneList); } catch (Exception ex) { return(ZoneList); } finally { db.Dispose(); } }