Ejemplo n.º 1
0
 public static int SavePaymentOut(string amount, string firstname, string email, string phone, string productinfo)
 {
     try
     {
         string         sqlconn      = ConfigurationManager.ConnectionStrings["DBCONN"].ConnectionString;
         SqlParameter[] sqlParameter = new SqlParameter[5];
         sqlParameter[0]           = new SqlParameter("@Amount", amount);
         sqlParameter[1]           = new SqlParameter("@Name", firstname);
         sqlParameter[2]           = new SqlParameter("@Email", email);
         sqlParameter[3]           = new SqlParameter("@Phone", phone);
         sqlParameter[4]           = new SqlParameter("@ID", SqlDbType.Int);
         sqlParameter[4].Direction = ParameterDirection.Output;
         SqlHelper.ExecuteNonQuery(sqlconn, CommandType.StoredProcedure, "sp_Insert_Payment_Info", sqlParameter);
         int identity = Convert.ToInt32(sqlParameter[4].Value);
         return(identity);
     }
     catch (Exception ex)
     {
         ExceptionHandling.WriteException(ex);
         return(-1);
     }
 }