private string mv_get_first_voucher() { String ret = ""; multiVoucher x = (multiVoucher)lstMultiVoucher.Items[0]; ret = x.service_provider_item_id.ToString(); return(ret); }
private void lstMultiVoucher_MeasureItem(object sender, MeasureItemEventArgs e) { if (e.Index < 0) { return; } multiVoucher x = (multiVoucher)lstMultiVoucher.Items[e.Index]; e.ItemHeight = 35 * GetLinesNumber((string)x.ToString()); }
private void update_multivoucher_status() { Decimal total_value = 0.0M; int total = 0; foreach (var listBoxItem in lstMultiVoucher.Items) { total++; multiVoucher x = (multiVoucher)listBoxItem; total_value += x.item_value; } lbl_plnMultiTotal.Text = "Total (" + total.ToString() + ")"; lbl_plnMultiTotalValue.Text = "R " + total_value.ToString(); }
private void lstMultiVoucher_DrawItem(object sender, DrawItemEventArgs e) { e.DrawBackground(); e.DrawFocusRectangle(); if (e.Index < 0) { return; } multiVoucher x = (multiVoucher)lstMultiVoucher.Items[e.Index]; e.Graphics.DrawString( x.ToString(), e.Font, new SolidBrush(e.ForeColor), e.Bounds); // draw some item separator e.Graphics.DrawLine(Pens.LightGray, e.Bounds.X, e.Bounds.Y + e.Bounds.Height - 2, e.Bounds.X + e.Bounds.Width, e.Bounds.Y + e.Bounds.Height - 2); }