public virtual dsCore.OrdersDataTable GetDataSalesQuotation(global::System.Nullable<global::System.DateTime> date1, global::System.Nullable<global::System.DateTime> date2) { this.Adapter.SelectCommand = this.CommandCollection[24]; if ((date1.HasValue == true)) { this.Adapter.SelectCommand.Parameters[0].Value = ((System.DateTime)(date1.Value)); } else { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; } if ((date2.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((System.DateTime)(date2.Value)); } else { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } dsCore.OrdersDataTable dataTable = new dsCore.OrdersDataTable(); this.Adapter.Fill(dataTable); return dataTable; }
public virtual dsCore.OrdersDataTable GetDataSalesQuotationAll() { this.Adapter.SelectCommand = this.CommandCollection[25]; dsCore.OrdersDataTable dataTable = new dsCore.OrdersDataTable(); this.Adapter.Fill(dataTable); return dataTable; }
public virtual dsCore.OrdersDataTable GetDataPurchaseOrdersAll() { this.Adapter.SelectCommand = this.CommandCollection[15]; dsCore.OrdersDataTable dataTable = new dsCore.OrdersDataTable(); this.Adapter.Fill(dataTable); return dataTable; }
public virtual dsCore.OrdersDataTable GetDataOutstandingSalesInvoices(global::System.Nullable<int> p1) { this.Adapter.SelectCommand = this.CommandCollection[10]; if ((p1.HasValue == true)) { this.Adapter.SelectCommand.Parameters[0].Value = ((int)(p1.Value)); } else { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; } dsCore.OrdersDataTable dataTable = new dsCore.OrdersDataTable(); this.Adapter.Fill(dataTable); return dataTable; }
public virtual dsCore.OrdersDataTable GetDataByOrderNo(string p1, string p2) { this.Adapter.SelectCommand = this.CommandCollection[4]; if ((p1 == null)) { throw new global::System.ArgumentNullException("p1"); } else { this.Adapter.SelectCommand.Parameters[0].Value = ((string)(p1)); } if ((p2 == null)) { throw new global::System.ArgumentNullException("p2"); } else { this.Adapter.SelectCommand.Parameters[1].Value = ((string)(p2)); } dsCore.OrdersDataTable dataTable = new dsCore.OrdersDataTable(); this.Adapter.Fill(dataTable); return dataTable; }
public virtual dsCore.OrdersDataTable GetDataByID(int p1) { this.Adapter.SelectCommand = this.CommandCollection[3]; this.Adapter.SelectCommand.Parameters[0].Value = ((int)(p1)); dsCore.OrdersDataTable dataTable = new dsCore.OrdersDataTable(); this.Adapter.Fill(dataTable); return dataTable; }
private void _grid_CellButtonClick(object sender, RowColEventArgs e) { if (c1Combo1.SelectedValue == null || c1Combo3.SelectedValue == null) { return; } Cursor = Cursors.AppStarting; try { // open item list form if (e.Col == _grid.Cols["ItemCode"].SafeIndex) { frmItemSearch fx; if (_grid[e.Row, "ItemCode"] == DBNull.Value) { fx = new frmItemSearch(); } else { fx = new frmItemSearch((int)_grid[e.Row, "ItemID"]); } fx.ShowDialog(); if (fx.SelectedOK) { dsCore.ItemsDataTable data = daItems1.GetDataByID(fx.SelectedID); // item info if (data.Rows.Count > 0) { _grid.SetData(e.Row, "ItemID", data[0].ID); _grid.SetData(e.Row, "ItemCode", data[0].Code); _grid.SetData(e.Row, "ItemName", data[0].Name); _grid.SetData(e.Row, "MeasureCode", data[0].IsMeasureCodeNull() ? "" : data[0].MeasureCode); _grid.SetData(e.Row, "UnitPrice", data[0].IsSellingPriceNull() ? 0 : data[0].SellingPrice); _grid.SetData(e.Row, "TaxPct", 0); _grid.SetData(e.Row, "TrxType", 0); _grid.SetData(e.Row, "Quantity", 1); // display default remark _grid.SetData(e.Row, "Remarks", c1TextBox2.Text); } } } // open invoice list form if (e.Col == _grid.Cols["ReferenceNo"].SafeIndex) { frmSalesInvoiceSearch fx = new frmSalesInvoiceSearch((int)c1Combo1.SelectedValue); fx.ShowDialog(); if (fx.SelectedOK) { dsCore.OrdersDataTable data = daOrders1.GetDataByID(fx.SelectedID); // item info if (data.Rows.Count > 0) { _grid.SetData(e.Row, "ReferenceID", fx.SelectedID); _grid.SetData(e.Row, "ReferenceNo", fx.SelectedCode); _grid.SetData(e.Row, "ReferenceDate", fx.SelectedDate); _grid.SetData(e.Row, "ReferenceValue", data[0].OrderValue); _grid.SetData(e.Row, "UnitPrice", fx.SelectedValue); _grid.SetData(e.Row, "TaxPct", 0); _grid.SetData(e.Row, "TrxType", 0); _grid.SetData(e.Row, "Quantity", 1); // display default remark _grid.SetData(e.Row, "Remarks", c1TextBox2.Text); } } } // Auto counting for kredit each time c1Label1.Value = CountDetails(); } catch (Exception ex) { Logger.ErrorRoutine(ex); RibbonMessageBox.Show("ERROR Adding Detail Items: " + ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } Cursor = Cursors.Default; }