public override void OutputLine(JoinPlToVpToProd line) { //TableCellLeft(line.SubCategoryName); TableCellLeftHilite(line.PurLine_VendorPartNum); TableCellRight(line.PurLine_QtyOrdered.ToString()); TableCellLeft(line.OrderingUnit); TableCellLeft(line.ProductNameAndModel); TableCellLeft(line.NonBlankSize); TableCellLeft(line.BrandName); TableCellRightHilite(line.PurLine_RetailPrice.ToString("c")); /* * string vendorRetail = "(same)"; * if (line.VendorProduct_RetailPriceOverride > 0) * vendorRetail = line.VendorProduct_RetailPriceOverride.ToString("c"); * TableCellRight(vendorRetail); * TableCellRight((line.BestNormalMargin*100.0D).ToString("F1") + "%"); * string vendorMargin = "(same)"; * if (line.BestVendorMargin != line.BestNormalMargin) * vendorMargin = (line.BestVendorMargin*100.0D).ToString("F1") + "%"; * TableCellRight(vendorMargin); */ TableCellRight(line.CostPerUnitOrdered.ToString("c")); TableCellRight(line.BestEachCost.ToString("c")); }
public override void OutputLine(JoinPlToVpToProd line) { TableCellLeft(line.SubCategoryName); TableCellRight(line.PurLine_QtyOnHand.ToString()); TableCellRight(line.PurLine_QtyOrdered.ToString()); TableCellLeft(line.OrderingUnit); TableCellLeft(line.ProductNameAndModel); TableCellLeft(line.NonBlankSize); TableCellLeft(line.BrandName); string levels = string.Empty; string busyLevels = string.Empty; string slowLevels = string.Empty; if (line.Product_QtyBusyMin != 0 || line.Product_QtyBusyMax != 0) { busyLevels = line.Product_QtyBusyMin.ToString() + "/" + line.Product_QtyBusyMax.ToString(); } if (line.Product_QtySlowMin != 0 || line.Product_QtySlowMax != 0) { slowLevels = line.Product_QtySlowMin.ToString() + "/" + line.Product_QtySlowMax.ToString(); } if (busyLevels == string.Empty) { levels = slowLevels; } else if (slowLevels == string.Empty) { levels = busyLevels; } else { levels = busyLevels + ":" + slowLevels; } TableCellLeft(levels); }
public override void OutputLine(JoinPlToVpToProd line) { TableCellRight(line.PurLine_QtyOrdered.ToString()); TableCellLeft(line.OrderingUnit); TableCellLeft(line.PurLine_VendorPartNum); TableCellLeft(line.ProductNameAndModel); TableCellLeft(line.NonBlankSize); TableCellLeft(line.BrandName); }
private void btnSetBrands_Click(object sender, EventArgs e) { bool onFirstRow = true; ProductBrandId brandId = null; int numberSet = 0; int numberSkipped = 0; List <DataGridViewRow> sortedRows = new List <DataGridViewRow>(); foreach (DataGridViewRow row in grdLines.SelectedRows) { sortedRows.Add(row); } sortedRows.Sort((r1, r2) => r1.Index.CompareTo(r2.Index)); foreach (DataGridViewRow row in sortedRows) { JoinPlToVpToProd purLine = (JoinPlToVpToProd)row.DataBoundItem; if (onFirstRow) { brandId = purLine.PurLine_ProductBrandId; ProductBrand brand = mBrandsById[brandId.Value]; string prompt = "Use brand \"" + brand.BrandName + "\"?"; if (MessageBox.Show(prompt, "Confirm", MessageBoxButtons.OKCancel) != DialogResult.OK) { return; } onFirstRow = false; } else { if (purLine.PurLine_VendorProductId.IsNull) { purLine.PurLine_ProductBrandId = brandId; using (Ambient.DbSession.Activate()) { OrderingRepositories.PurLine.Update(purLine.InnerPurLine); numberSet++; } } else { numberSkipped++; } } } MessageBox.Show("Set brand for " + numberSet.ToString() + " rows."); MessageBox.Show("Skipped " + numberSkipped.ToString() + " rows because they were not manually added or imported to this order."); ShowLines(); ShowTotalCost(); }
public bool IncludeLine(JoinPlToVpToProd line) { return(line.PurLine_QtyOrdered > 0); }
public bool IncludeLine(JoinPlToVpToProd line) { return(true); }
public abstract void OutputLine(JoinPlToVpToProd line);