Пример #1
0
 public void DeleteTest()
 {
     try
     {
         docService.Delete("1");
         Assert.True(true);
     }
     catch
     {
         Assert.True(false);
     }
 }
Пример #2
0
        public IHttpActionResult Delete(Dictionary <string, object> SearchData)
        {
            try
            {
                string ServerReportPath = Lib.GetReportPath(SearchData["comp_code"].ToString());
                string ServerImagePath  = Lib.GetImagePath(SearchData["comp_code"].ToString());

                using (DocService obj = new DocService())
                    return(Ok(obj.Delete(SearchData, ServerImagePath)));
            }
            catch (Exception Ex)
            {
                return(ResponseMessage(Request.CreateErrorResponse(HttpStatusCode.BadRequest, Ex.Message.ToString())));
            }
        }