Ejemplo n.º 1
0
        public void TestMnozenia(double num1, double num2, double expected)
        {
            var mnozenie = new OperationProduct();
            var actual   = mnozenie.DoTheOperation(num1, num2);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 2
0
 public OperationProductModel(OperationProduct item)
 {
     this.Name        = item.Name;
     this.Amount      = item.Amount;
     this.Price       = item.Price;
     this.UnitId      = item.UnitId;
     this.ProductUnit = item.ProductUnit;
     this.Sum         = item.Sum;
 }
Ejemplo n.º 3
0
        private int OperationSaleProccesProduct(List <OperationProduct> OperationProduct)
        {
            OperationProduct opeationProduct = new OperationProduct();

            foreach (var item in OperationProduct)
            {
                item.SaleProduct = (from q in Erisim.Sale
                                    orderby q.SaleID descending
                                    select q).First().SaleID;
            }
            Erisim.OperationProduct.InsertAllOnSubmit(OperationProduct);
            Erisim.SubmitChanges();
            return(1);
        }