public virtual List <LocationsContract> SelectBy_LocationId(string authId, SelectBy_LocationIdPx px) { try { return (Can(authId, (int)PermissionEnum.Client_Locations_SelectBy_LocationId) ? LocationsLogic.SelectBy_LocationIdNow(px.LocationId) : null);//cant } catch (Exception ex) { #if DEBUG Debug.WriteLine("------------------------------"); Debug.WriteLine("------ LocationsServiceBase.SelectBy_LocationId ERROR ------"); Debug.WriteLine("------------------------------"); Debug.WriteLine(ex.Message); Debug.WriteLine(ex.ToString()); Debug.WriteLine("------------------------------"); #endif throw; } }
public virtual LocationsContract Get(string authId, string fldLocationId) { try { if (Can(authId, (int)PermissionEnum.Client_Locations_SelectBy_LocationId)) { var results = LocationsLogic.SelectBy_LocationIdNow((int)Convert.ChangeType(fldLocationId, typeof(int))); return(results.Count == 0 ? null : results[0]); } return(null); //cant } catch (Exception ex) { #if DEBUG Debug.WriteLine("------------------------------"); Debug.WriteLine("------ LocationsServiceBase.SelectBy_LocationId ERROR ------"); Debug.WriteLine("------------------------------"); Debug.WriteLine(ex.Message); Debug.WriteLine(ex.ToString()); Debug.WriteLine("------------------------------"); #endif throw; } }