Пример #1
0
        private void loadSalesData(clsSales oSales)
        {
            lvSalesData.Items.Clear();
            lvSalesData.SuspendLayout();
            List <clsSalesData> list = new List <clsSalesData>();

            clsSalesData salesDataClass = new clsSalesData();

            list = salesDataClass.getSalesData(oSales);

            foreach (clsSalesData clsSalesData in list)
            {
                ListViewItem oItem = new ListViewItem();

                oItem.Text = clsSalesData.Inventory.TrackingCode;
                oItem.SubItems.Add(clsSalesData.Inventory.Car.Name);
                oItem.SubItems.Add(clsSalesData.Inventory.Details);
                oItem.SubItems.Add(clsSalesData.Inventory.SoldDate.ToString("MMM dd, yyyy"));
                oItem.ImageKey = "folder";

                oItem.Tag = clsSalesData;

                lvSalesData.Items.Add(oItem);
            }

            lvSalesData.ResumeLayout();
        }
Пример #2
0
        private bool saveSalesData(clsInventory oInventory, int idSalesControl, DateTime salescontrolsolddate)
        {
            clsSalesData oSalesData = new clsSalesData();

            oSalesData.Inventory            = oInventory;
            oSalesData.idSalesControl       = idSalesControl;
            oSalesData.SalesControlsoldDate = salescontrolsolddate;

            if (oSalesData.save(oInventory))
            {
                return(true);
            }

            return(false);
        }