public static void Deserialize() { try { RawMaterialOrderDAL.Deserialize(); } catch (Exception) { throw; } }
public static List <RawMaterialOrder> GetAllRMOrdersBL() { List <RawMaterialOrder> RMorderlist = null; try { RawMaterialOrderDAL rawMaterialorderDAL = new RawMaterialOrderDAL(); RMorderlist = rawMaterialorderDAL.GetAllRMOrdersDAL(); } catch (Exception ex) { throw ex; } return(RMorderlist); }
public static RawMaterialOrder SearchRawMaterialOrderByIDBL(int searchRawMaterialOrderID) { RawMaterialOrder searchRawMaterialOrder = null; try { RawMaterialOrderDAL rawMaterialOrderDAL = new RawMaterialOrderDAL(); searchRawMaterialOrder = rawMaterialOrderDAL.SearchRawMaterialOrderDAL(searchRawMaterialOrderID); } catch (InventoryException ex) { throw ex; } return(searchRawMaterialOrder); }
public static List <RawMaterialOrder> GetAllRawMaterialOrdersBL() { List <RawMaterialOrder> rawMaterialOrderList = null; try { RawMaterialOrderDAL rawMaterialOrderDAL = new RawMaterialOrderDAL(); rawMaterialOrderList = rawMaterialOrderDAL.GetAllRawMaterialOrdersDAL(); } catch (InventoryException ex) { throw ex; } return(rawMaterialOrderList); }
public static bool AddRMOrderDL(RawMaterialOrder order, List <RawMaterialOrder> orderDetails) { bool RMorderAdded = false; try { if (ValidateRawMaterialOrder(order)) { RawMaterialOrderDAL rawMaterialorderDAL = new RawMaterialOrderDAL(); RMorderAdded = rawMaterialorderDAL.AddRMOrderDAL(order, orderDetails); } } catch (SystemException ex) { throw new Exception(ex.Message); } return(RMorderAdded); }
public static bool UpdateRMOrderBL(RawMaterialOrder updateorder) { bool orderUpdated = false; try { if (ValidateRawMaterialOrder(updateorder)) { RawMaterialOrderDAL rawMaterialorderDAL = new RawMaterialOrderDAL(); orderUpdated = rawMaterialorderDAL.UpdateRMOrderDAL(updateorder); } } catch (SystemException ex) { throw new Exception(ex.Message); } return(orderUpdated); }
public static bool DeleteRMOrderBL(string RMOrderID) { bool RMOrderDeleted = false; try { Regex regex = new Regex("^[R][O][0-9][0-9][0-9]$"); bool b = regex.IsMatch(RMOrderID); if (b == true) { RawMaterialOrderDAL rawMaterialorderDAL = new RawMaterialOrderDAL(); RMOrderDeleted = rawMaterialorderDAL.DeleteRMOrderDAL(RMOrderID); } } catch (Exception ex) { throw new Exception(ex.Message); } return(RMOrderDeleted); }
public static bool DeleteRawMaterialOrderBL(int deleteRawMaterialOrderID) { bool rawMaterialOrderDeleted = false; try { if (deleteRawMaterialOrderID > 0 && deleteRawMaterialOrderID < 99999) { RawMaterialOrderDAL rawMaterialOrderDAL = new RawMaterialOrderDAL(); rawMaterialOrderDeleted = rawMaterialOrderDAL.DeleteRawMaterialOrderDAL(deleteRawMaterialOrderID); } else { throw new InventoryException("Invalid Order ID"); } } catch (InventoryException) { throw; } return(rawMaterialOrderDeleted); }
public static bool AddRawMaterialOrderBL(RawMaterialOrder newRawMaterialOrder) { bool rawMaterialOrderAdded = false; try { if (ValidateRawMaterialOrder(newRawMaterialOrder)) { RawMaterialOrderDAL rawMaterialDAL = new RawMaterialOrderDAL(); rawMaterialOrderAdded = rawMaterialDAL.AddRawMaterialOrderDAL(newRawMaterialOrder); } else { throw new InventoryException("Invalid Order Material Details"); } } catch (InventoryException) { throw; } return(rawMaterialOrderAdded); }