public static List <Entities.ProductOrder> GetAllRMOrdersBL() { List <Entities.ProductOrder> productorderlist = null; try { ProductOrderDAL productorderDAL = new ProductOrderDAL(); productorderlist = productorderDAL.GetAllproductOrdersDAL(); } catch (Exception ex) { throw new InventoryException(ex.Message); } return(productorderlist); }
public static bool AddProductOrderDL(Entities.ProductOrder order, List <Entities.ProductOrder> orderDetails) //method to do validations for add product order method { bool ProductorderAdded = false; try { if (ValidateProductOrder(order)) { ProductOrderDAL productorderDAL = new ProductOrderDAL(); ProductorderAdded = productorderDAL.AddProductOrderDAL(order, orderDetails); } } catch (Exception ex) { throw new InventoryException(ex.Message); } return(ProductorderAdded); }
public static bool UpdateProductOrderBL(Entities.ProductOrder updateorder) //method to do validations for update product order { bool orderUpdated = false; try { if (ValidateProductOrder(updateorder)) { ProductOrderDAL productorderDAL = new ProductOrderDAL(); orderUpdated = productorderDAL.UpdateProductOrderDAL(updateorder); } } catch (Exception ex) { throw new InventoryException(ex.Message); } return(orderUpdated); }
public static bool AddProductOrderDL(Entities.ProductOrder order, List <Entities.ProductOrder> orderDetails) { bool ProductorderAdded = false; try { if (ValidateProductOrder(order)) { ProductOrderDAL productorderDAL = new ProductOrderDAL(); ProductorderAdded = productorderDAL.AddProductOrderDAL(order, orderDetails); } } catch (SystemException ex) { throw new Exception(ex.Message); } return(ProductorderAdded); }
public static bool UpdateProductOrderBL(Entities.ProductOrder updateorder) { bool orderUpdated = false; try { if (ValidateProductOrder(updateorder)) { ProductOrderDAL productorderDAL = new ProductOrderDAL(); orderUpdated = productorderDAL.UpdateProductOrderDAL(updateorder); } } catch (SystemException ex) { throw new Exception(ex.Message); } return(orderUpdated); }
public static bool DeleteProductOrderBL(string productOrderID) //method to do validations for deleting product order { bool productOrderDeleted = false; try { Regex regex = new Regex("^[P][O][0-9][0-9][0-9]$"); bool b = regex.IsMatch(productOrderID); if (b == true) { ProductOrderDAL productorderDAL = new ProductOrderDAL(); productOrderDeleted = productorderDAL.DeleteProductOrderDAL(productOrderID); } } catch (Exception ex) { throw new InventoryException(ex.Message); } return(productOrderDeleted); }