internal async Task <JsonResult> ScanAwbNoManifestCreate(Post_Manifest post_Manifest) { SqlConnection cn = null; try { cn = Connection.GetConnection(); SqlCommand smd = new SqlCommand("manifest_sorting_scan", cn) { CommandType = CommandType.StoredProcedure }; smd.Parameters.Add("@json_output", SqlDbType.NVarChar, -1).Direction = ParameterDirection.Output; smd.Parameters.AddWithValue("@awb_no", post_Manifest.awb_no); smd.Parameters.AddWithValue("@created_by", post_Manifest.created_by); smd.Parameters.AddWithValue("@location_id", post_Manifest.location_id); // Execute the command await smd.ExecuteNonQueryAsync().ConfigureAwait(false); // Get the values string json = smd.Parameters["@json_output"].Value.ToString(); smd.Dispose(); JArray arr = JArray.Parse(json); return(new JsonResult(arr)); } catch (Exception) { throw; } finally { Connection.CloseConnection(ref cn); } }
public async Task <JsonResult> ScanAwbNoManifestCreate([FromBody] Post_Manifest post_Manifest) { try { return(await _manifestLogic.ScanAwbNoManifestCreate(post_Manifest).ConfigureAwait(false)); } catch (Exception ee) { return(await _manifestLogic.SendRespose("False", ee.Message).ConfigureAwait(false)); } }