public DialogQuantityOrder(MDataSet.ProductRow source, MDataSet.OrdersRow newRow) { InitializeComponent(); newRow.ProductRef = source.ID; this.productBindingSource.DataSource = source; if (source.GetRemainsRows().Length != 0) { foreach (MDataSet.RemainsRow row in source.GetRemainsRows()) { _QauntityRemains += row.QuantityRemains; } } this.ordersBindingSource.DataSource = newRow; this.labelRem.DataBindings.Add(new Binding("Text", this, "QauntityRemains")); }
private void gridViewProd_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e) { MDataSet.ProductRow prodRow = this.gridViewProd.GetDataRow(e.RowHandle) as MDataSet.ProductRow; if (prodRow == null) { return; } if (prodRow.GetRemainsRows().Length == 0) { e.Appearance.Font = e.Cache.GetFont(e.Appearance.Font, FontStyle.Italic); e.Appearance.ForeColor = Color.Gray; } }