Esempio n. 1
0
        internal async Task <JsonResult> PutwayData(Putway putway)
        {
            SqlConnection cn = null;

            try
            {
                cn = Connection.GetConnection();
                SqlCommand smd = new SqlCommand("putway_start_data", cn)
                {
                    CommandType = CommandType.StoredProcedure
                };
                smd.Parameters.AddWithValue("@putway_header_no", putway.PutwayHeaderNo);
                smd.Parameters.Add("@jsonOutput", SqlDbType.NVarChar, -1).Direction = ParameterDirection.Output;
                await smd.ExecuteNonQueryAsync().ConfigureAwait(false);

                string json = smd.Parameters["@jsonOutput"].Value.ToString();
                smd.Dispose();
                JArray arr = JArray.Parse(json);
                return(new JsonResult(arr));
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                Connection.CloseConnection(ref cn);
            }
        }
Esempio n. 2
0
 public async Task <JsonResult> PutwayWithoutScanBarcode([FromBody] Putway putway)
 {
     try
     {
         return(await _putwayLogic.PutwayWithoutScanBarcode(putway).ConfigureAwait(false));
     }
     catch (Exception ee)
     {
         return(await _putwayLogic.SendRespose("False", ee.Message).ConfigureAwait(false));
     }
 }
Esempio n. 3
0
 public async Task <JsonResult> PutwayComplete([FromBody] Putway complete)
 {
     try
     {
         return(await _putwayLogic.PutwayComplete(complete).ConfigureAwait(false));
     }
     catch (Exception ee)
     {
         return(await _putwayLogic.SendRespose("False", ee.Message).ConfigureAwait(false));
     }
 }