public static skSales GetSalesObject(int SaleID) { DataFunctions DB = new DataFunctions(); skSales SalesOBJ = DB.GetSalesDetails(SaleID); if (SalesOBJ != null) { return(SalesOBJ); } else { throw new Exception("No sale found !"); } }
public static void OpenSaleTab(skSales SaleObj) { ObjectMessenger om = new ObjectMessenger(); if (SaleObj != null) { om.Send("TRANOBJ", SaleObj); UI.Enviroment.LoadNewTab("SalesDetailsView"); } else { throw new Exception("No Sale with this ID can be found."); } }
public static skSales GetSalesObject(int SaleID) { Proxies.AppDataClient DataClient = new Proxies.AppDataClient(); try { DataClient.Open(); skSales SalesOBJ = DataClient.GetSaleObject(SaleID).SalesObject; if (SalesOBJ != null) { return(SalesOBJ); } else { throw new Exception("No sale found !"); } } finally { DataClient.Close(); } }