internal async Task <JArray> handover_create(handover_create handover_Create) { SqlConnection cn = null; try { cn = Connection.GetConnection(); SqlCommand smd = new SqlCommand("manifest_handover_create", cn) { CommandType = CommandType.StoredProcedure }; smd.Parameters.Add("@json_output", SqlDbType.NVarChar, -1).Direction = ParameterDirection.Output; smd.Parameters.AddWithValue("@handover_selected_line", ToDataTable(handover_Create.handover_Line)); smd.Parameters.AddWithValue("@location_id", handover_Create.location_id); // Execute the command await smd.ExecuteNonQueryAsync().ConfigureAwait(false); // Get the values string json = smd.Parameters["@json_output"].Value.ToString(); smd.Dispose(); return(JArray.Parse(json)); } catch (Exception) { throw; } finally { Connection.CloseConnection(ref cn); } }
public async Task <IActionResult> handover_create(handover_create handover_Create) { try { JArray array = await _manifestLogic.handover_create(handover_Create).ConfigureAwait(false); return(await print_handover_report(array).ConfigureAwait(false)); } catch (Exception ee) { return(await _manifestLogic.SendRespose("False", ee.Message).ConfigureAwait(false)); } }