Exemple #1
0
        public void InsertLogistics(Vendor.BusinessLayer.LogisticsBL argLogistics)
        {
            SqlConnection conn;

            conn = new SqlConnection();
            conn = BsfGlobal.OpenVendorAnalDB();
            SqlTransaction tran = conn.BeginTransaction();

            try
            {
                SqlCommand Command = new SqlCommand("Insert_Logistics", conn, tran);
                Command.CommandType = CommandType.StoredProcedure;
                Command.Parameters.Clear();
                Command.Parameters.AddWithValue("@VendorId", argLogistics.VendorId);
                Command.Parameters.AddWithValue("@TransportArrange", argLogistics.TransportArrange);
                Command.Parameters.AddWithValue("@TransportMode", argLogistics.TransportMode);
                Command.Parameters.AddWithValue("@Delivery", argLogistics.Delivery);
                Command.Parameters.AddWithValue("@Insurance", argLogistics.Insurance);
                Command.Parameters.AddWithValue("@Unload", argLogistics.Unload);

                Command.ExecuteNonQuery();
                tran.Commit();
            }
            catch
            {
                tran.Rollback();
            }

            finally
            {
                conn.Close();
            }
        }
Exemple #2
0
 public void InsertLogistics(Vendor.BusinessLayer.LogisticsBL argLogistics)
 {
     m_oLogistics.InsertLogistics(argLogistics);
 }