示例#1
0
        // image processor request
        public CreateScreenResponse CreateScreen(CreateScreenRequest request)
        {
            var response = new CreateScreenResponse();
            response.Success = true;

            try
            {
                //call our data or business layer to do our image processing request aka imgpur / in this case we insert the ref id and url to a sql server express db. imgpur will pick /read this from sql express and then process.
                new ScrurRepository().CreateScreenNailer(request.ReferenceId, request.Url);
            }
            catch (Exception ex)
            {
                response.ErrorCode = ErrorCodes.WebServiceCall;
                response.Message = ex.Message;
                response.Success = false;
            }
            return response;
        }
 public void SaveScreenAsync(int ReferenceId, string Url, RequestCompletedDelegate<CreateScreenResponse> callback)
 {
     WebServices<CreateScreenRequest, CreateScreenResponse> ws = new WebServices<CreateScreenRequest, CreateScreenResponse>();
     var request = new CreateScreenRequest() { ReferenceId = ReferenceId, Url = Url };
     ws.MakeRequestAsync(BaseURL + "/" + Urls.CreateScreen, request,callback);
 }
 public void SaveScreen(int ReferenceId, string Url)
 {
     WebServices<CreateScreenRequest, CreateScreenResponse> ws = new WebServices<CreateScreenRequest, CreateScreenResponse>();
     var request = new CreateScreenRequest() { ReferenceId = ReferenceId, Url = Url };
     ws.MakeRequest(BaseURL + "/" + Urls.CreateScreen, request);
 }