예제 #1
0
		public GetLaneFileForEditResponse GetLaneFileForEdit (WebServiceLogin login, int lanefile_id)
		{
			GetLaneFileForEditResponse response = new GetLaneFileForEditResponse ();

			using (DB db = new DB ()) {
				VerifyUserInRole (db, login, Roles.Administrator);
				response.Lanefile = DBLanefile_Extensions.Create (db, lanefile_id);
				response.Lanes = DBLanefile_Extensions.GetLanesForFile (db, response.Lanefile);
			}

			return response;
		}
예제 #2
0
		public GetLaneFileForEditResponse GetLaneFileForEdit (WebServiceLogin login, int lanefile_id)
		{
			GetLaneFileForEditResponse response = new GetLaneFileForEditResponse ();

			using (DB db = new DB ()) {
				response.Lanefile = DBLanefile_Extensions.Create (db, lanefile_id);
				VerifyUserInRoles (db, login, response.Lanefile.additional_roles, false);
				response.Lanes = DBLanefile_Extensions.GetLanesForFile (db, response.Lanefile);
			}

			return response;
		}