public void Index(pickUp a) { try { SqlConnection con = new SqlConnection(); con.ConnectionString = ConfigurationManager.ConnectionStrings["EcommerceCon"].ConnectionString; if (con.State == ConnectionState.Closed) { con.Open(); } SqlCommand cmd = new SqlCommand(); cmd.Connection = con; cmd.CommandText = "pSMWDeliveryPickUp"; cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@username", SqlDbType.VarChar).Value = a.username; cmd.Parameters.Add("@email", SqlDbType.VarChar).Value = a.email; cmd.Parameters.Add("@date", SqlDbType.VarChar).Value = a.date; cmd.Parameters.Add("@time", SqlDbType.VarChar).Value = a.time; cmd.Parameters.Add("@pincode", SqlDbType.VarChar).Value = a.pincode; cmd.Parameters.Add("@mobile", SqlDbType.VarChar).Value = a.mobile; cmd.Parameters.Add("@mac", SqlDbType.VarChar).Value = a.mac; cmd.ExecuteNonQuery(); con.Close(); } catch (Exception e) { } }
public ActionResult PickDelivery(pickUp a) { TempData["username"] = a.username.ToString(); TempData["email"] = a.email.ToString(); TempData["pincode"] = a.pincode.ToString(); TempData["date"] = a.date.ToString(); TempData["time"] = a.time.ToString(); TempData["mac"] = a.mac.ToString(); TempData["mobile"] = a.mobile.ToString(); TempData.Keep(); return(View("paymentPickUp")); }