public FrmInvoice() { InitializeComponent(); InitFilterComboBox(); invoiceSelectionView = new InvoiceSelectionView(this.outboundView); invoiceEditView = new InvoiceEditView(this.editView); outboundView.RowCellClick += new RowCellClickEventHandler(outBoundView_CellClick); }
public void GetSelectionOutbound(InvoiceSelectionView selView) { GridView view = selView.GetGridView(); this.ClearRows(); DataRow dr = null; Object obj = null; for (int i = 0, idx = 1; i < view.RowCount; i++) { if (selView.GetChecked(i) == false) { continue; } dr = dataTable.NewRow(); dr["Index"] = idx++; obj = view.GetRowCellValue(i, "OrderDate"); if (obj == null || String.IsNullOrEmpty(obj.ToString())) { dr["Date"] = ""; } else { DateTime time = Convert.ToDateTime(obj); //dr["Date"] = time.ToString("MM")+"/"+time.ToString("dd")+"/"+time.ToString("yy"); dr["Date"] = time.ToString("yyyy-MM-dd"); } dr["OrderNo"] = view.GetRowCellValue(i, "OrderNo"); dr["Quantity"] = view.GetRowCellValue(i, "Quantity"); dr["InvoiceAmount"] = view.GetRowCellValue(i, "InvoiceAmount"); dr["DueAmount"] = view.GetRowCellValue(i, "DueAmount"); dataTable.Rows.Add(dr); } this.gridView.GridControl.DataSource = dataTable; }