protected override void Initialize() { int tmp = UniversalFunctions.Rand(1, 100); tmp %= 4 + 1; DivisionTable.Initialize(); switch (tmp) { case 1: DelGen = FloatingPointNumberFunction.GenerateAddition; DelCom = FloatingPointNumberFunction.VerifyAddition; break; case 2: DelGen = FloatingPointNumberFunction.GenerateSubtraction; DelCom = FloatingPointNumberFunction.VerifySubtraction; break; case 3: DelGen = FloatingPointNumberFunction.GenerateMultiplication; DelCom = FloatingPointNumberFunction.VerifyMultiplication; break; case 4: DelGen = DivisionTableOfFloatingPoints.GetValue; DelCom = FloatingPointNumberFunction.VerifyDivision; break; default: break; } }
public override void Initialize() { int tmp = UniversalFunctions.Rand(1, 100); tmp %= 4 + 1; DivisionTable.Initialize(); switch (tmp) { case 1: DelGen = OrdinaryFractionsFunction.GenerateAddition; DelCom = OrdinaryFractionsFunction.VerifyAswers; break; case 2: DelGen = OrdinaryFractionsFunction.GenerateSubtraction; DelCom = OrdinaryFractionsFunction.VerifyAswers; break; case 3: DelGen = OrdinaryFractionsFunction.GenerateMultiplication; DelCom = OrdinaryFractionsFunction.VerifyAswers; break; case 4: DelGen = OrdinaryFractionsFunction.GenerateDivision; DelCom = OrdinaryFractionsFunction.VerifyAswers; break; default: break; } }
public PackingHeaderViewModel GetPackingHeaderViewModel(int id) { PackingHeaderViewModel packingheader = (from H in db.PackingHeader join B in db.Persons on H.BuyerId equals B.PersonID into BuyerTable from BuyerTab in BuyerTable.DefaultIfEmpty() join B in db.Persons on H.JobWorkerId equals B.PersonID into JobWorkerTable from JobWorkerTab in JobWorkerTable.DefaultIfEmpty() join D in db.DocumentType on H.DocTypeId equals D.DocumentTypeId into DocumentTypeTable from DocumentTypeTab in DocumentTypeTable.DefaultIfEmpty() join Div in db.Divisions on H.DivisionId equals Div.DivisionId into DivisionTable from DivisionTab in DivisionTable.DefaultIfEmpty() join S in db.Site on H.SiteId equals S.SiteId into SiteTable from SiteTab in SiteTable.DefaultIfEmpty() join G in db.Godown on H.GodownId equals G.GodownId into GodownTable from GodownTab in GodownTable.DefaultIfEmpty() join Du in db.Units on H.DealUnitId equals Du.UnitId into DeliveryUnitTable from DeliveryUnitTab in DeliveryUnitTable.DefaultIfEmpty() where H.PackingHeaderId == id select new PackingHeaderViewModel { PackingHeaderId = H.PackingHeaderId, DocTypeName = DocumentTypeTab.DocumentTypeName, DocDate = H.DocDate, DocNo = H.DocNo, BuyerId = H.BuyerId, DocTypeId = H.DocTypeId, BuyerName = BuyerTab.Name, JobWorkerId = H.JobWorkerId.Value, JobWorkerName = JobWorkerTab.Name, DivisionId = H.DivisionId, DivisionName = DivisionTab.DivisionName, SiteId = H.SiteId, SiteName = SiteTab.SiteName, GodownId = H.GodownId, GodownName = GodownTab.GodownName, DealUnitId = H.DealUnitId, DealUnitName = DeliveryUnitTab.UnitName, BaleNoPattern = H.BaleNoPattern, ShipMethodId = H.ShipMethodId, Remark = H.Remark, Status = H.Status, CreatedBy = H.CreatedBy, CreatedDate = H.CreatedDate, ModifiedBy = H.ModifiedBy, ModifiedDate = H.ModifiedDate, LockReason = H.LockReason, TotalQty = H.PackingLines.Sum(m => m.Qty), DecimalPlaces = (from o in H.PackingLines join prod in db.Product on o.ProductId equals prod.ProductId join u in db.Units on prod.UnitId equals u.UnitId select u.DecimalPlaces).Max(), }).FirstOrDefault(); return(packingheader); }
protected override void Initialize() { DivisionTable.Initialize(); DelCom = IntegerFunctions.VerifyDivision; DelGen = DivisionTable.GetValue; }