public void CartDetailDelete(CartDetails cartDetails) { try { objDALComponent.SetParameters("@cartid", SqlDbType.Int, 4, cartDetails.CartId); objDALComponent.SqlCommandText = "CartDetailDelete"; int x = objDALComponent.DeleteRecord(); } catch (SqlException sqlEx) { throw new ApplicationException("Data error=" + sqlEx.Message.ToString()); } catch (Exception ex) { throw new ApplicationException("Error=" + ex.Message.ToString()); } }
public int CreateUserCart(CartDetails cartDetails) { try { objDALComponent.SetParameters("@cartId", SqlDbType.Int, 4, cartDetails.CartId); objDALComponent.SetParameters("@userId", SqlDbType.Int, 4, cartDetails.UserId); objDALComponent.SetParameters("@adpostId", SqlDbType.Int, 4, cartDetails.AdPostId); objDALComponent.SetParameters("@idvalue", SqlDbType.Int, true); objDALComponent.SqlCommandText = "CreateUserCart"; int x = objDALComponent.CreateRecord(); return x; } catch (SqlException sqlEx) { throw new ApplicationException("Data error=" + sqlEx.Message.ToString()); } catch (Exception ex) { throw new ApplicationException("Error=" + ex.Message.ToString()); } }
public void UpdateCartStatus(CartDetails cartDetails) { try { objDALComponent.SetParameters("@adpostid", SqlDbType.Int, 4, cartDetails.AdPostId); objDALComponent.SetParameters("@userid", SqlDbType.Int, 4, cartDetails.UserId); objDALComponent.SqlCommandText = "UpdateCartStatus"; int x = objDALComponent.UpdateRecord(); } catch (SqlException sqlEx) { throw new ApplicationException("Data error=" + sqlEx.Message.ToString()); } catch (Exception ex) { throw new ApplicationException("Error=" + ex.Message.ToString()); } }