Esempio n. 1
0
 public override void InitModuleObjectList()
 {
     ReceiptItemsList.InitVinaList(this,
                                   "ICReceipts",
                                   "ICReceiptItems",
                                   VinaList <ICReceiptItemsInfo> .cstRelationForeign);
     ReceiptItemsList.ItemTableForeignKey = "FK_ICReceiptID";
 }
Esempio n. 2
0
        public void UpdateTotalAmount()
        {
            ICReceiptsInfo mainobject = (ICReceiptsInfo)MainObject;

            mainobject.ICReceiptSubTotalAmount = ReceiptItemsList.Sum(o => o.ICReceiptItemTotalAmount);
            mainobject.ICReceiptDiscountAmount = mainobject.ICReceiptSubTotalAmount * mainobject.ICReceiptDiscountPercent / 100;
            mainobject.ICReceiptTaxAmount      = (mainobject.ICReceiptSubTotalAmount - mainobject.ICReceiptDiscountAmount) * mainobject.ICReceiptTaxPercent / 100;
            mainobject.ICReceiptTotalAmount    = mainobject.ICReceiptSubTotalAmount - mainobject.ICReceiptDiscountAmount + mainobject.ICReceiptTaxAmount;
            UpdateMainObjectBindingSource();
        }
Esempio n. 3
0
 public override void SetDefaultModuleObjectsList()
 {
     try
     {
         ReceiptItemsList.SetDefaultListAndRefreshGridControl();
     }
     catch (Exception)
     {
         return;
     }
 }
Esempio n. 4
0
        public override void SaveModuleObjects()
        {
            ICStockLotsController objStockLotsController = new ICStockLotsController();
            ICStockLotsInfo       objStockLotsInfo       = new ICStockLotsInfo();

            ICProductsController objProductsController = new ICProductsController();
            ICProductsInfo       objProductsInfo       = new ICProductsInfo();

            ReceiptItemsList.ForEach(o =>
            {
                objProductsInfo = (ICProductsInfo)objProductsController.GetObjectByID(o.FK_ICProductID);
                if (objProductsInfo == null)
                {
                    return;
                }

                objStockLotsInfo = objStockLotsController.GetStockLotByProductAndLotNo(o.FK_ICProductID, o.ICReceiptItemStockLotNo);
                if (objStockLotsInfo == null)
                {
                    objStockLotsInfo = new ICStockLotsInfo()
                    {
                        ICStockLotNo            = o.ICReceiptItemStockLotNo,
                        FK_ICProductID          = o.FK_ICProductID,
                        ICStockLotProductNo     = objProductsInfo.ICProductNo,
                        ICStockLotProductName   = objProductsInfo.ICProductName,
                        ICStockLotProductDesc   = objProductsInfo.ICProductDesc,
                        ICStockLotProductLength = objProductsInfo.ICProductLength,
                        ICStockLotProductWidth  = objProductsInfo.ICProductWidth,
                        ICStockLotProductHeight = objProductsInfo.ICProductHeight
                    };
                    objStockLotsController.CreateObject(objStockLotsInfo);
                }
                o.FK_ICStockLotID = objStockLotsInfo.ICStockLotID;
            });
            ReceiptItemsList.SaveItemObjects();
        }
Esempio n. 5
0
 public override void InitGridControlInVinaList()
 {
     ReceiptItemsList.InitVinaListGridControl();
 }
Esempio n. 6
0
 public override void InvalidateModuleObjects(int iObjectID)
 {
     ReceiptItemsList.Invalidate(iObjectID);
 }