public void UpdateUserReg(UserRegisterBO regBO) { try { register.UpdateUserDetail(regBO); } catch (Exception ex) { ex.GetType(); } }
public void UserReg(UserRegisterBO regBO, LoginBO login) { try { register.InsertUserDetail(regBO, login); } catch (Exception ex) { ex.GetType(); } }
//Update user details public Int32 UpdateUserDetail(UserRegisterBO user) { int result; connection.Open(); try { SqlCommand command = new SqlCommand("sp_update_customer", connection); command.CommandType = CommandType.StoredProcedure; command.Parameters.AddWithValue("@customer_name", user.customerName); command.Parameters.AddWithValue("@customer_address", user.address); command.Parameters.AddWithValue("@customer_contact_no", user.address); command.Parameters.AddWithValue("@customer_mail_Id", user.address); if (connection.State == ConnectionState.Closed) { connection.Open(); } result = command.ExecuteNonQuery(); command.Dispose(); if (result > 0) { return(result); } else { return(0); } } catch (Exception ex) { throw; } finally { if (connection.State != ConnectionState.Closed) { connection.Close(); } } }