public frmRepairSubDetail(DataTable dtSubOrder, IPosTransaction posTransaction, IApplication Application, frmRepairDetail fOrderDetails, string UniqueID) { InitializeComponent(); pos = posTransaction; application = Application; frmRepairDetail = fOrderDetails; sUnique = UniqueID; // BindRateTypeCombo(); btnPOSItemSearch.Focus(); dtItemInfo = dtSubOrder; dtTemp = dtSubOrder.Clone(); DataRow[] drTemp = dtSubOrder.Select("UNIQUEID='" + UniqueID + "'"); foreach (DataRow dr in drTemp) { dtTemp.ImportRow(dr); } grItems.DataSource = dtTemp; if (dtTemp != null && dtTemp.Rows.Count > 0) { Decimal dTotalAmount = 0m; foreach (DataRow drTotal in dtTemp.Rows) { dTotalAmount += Convert.ToDecimal(drTotal["AMOUNT"]); } } }
public frmRepairSubDetail(IPosTransaction posTransaction, IApplication Application, frmRepairDetail fOrderDetails, string UniqueID) { InitializeComponent(); pos = posTransaction; application = Application; frmRepairDetail = fOrderDetails; sUnique = UniqueID; // BindRateTypeCombo(); btnPOSItemSearch.Focus(); }
public frmRepairSubDetail(DataSet dsSearchedDetails, IPosTransaction posTransaction, IApplication Application, frmRepairDetail fOrderDetails, string UniqueID) { InitializeComponent(); pos = posTransaction; application = Application; frmRepairDetail = fOrderDetails; sUnique = UniqueID; // BindRateTypeCombo(); btnPOSItemSearch.Focus(); DataTable dtSearchedOrdersTemp = new DataTable(); dtSearchedOrdersTemp = dsSearchedDetails.Tables[2].Clone(); DataRow[] drTemp = dsSearchedDetails.Tables[2].Select("ORDERDETAILNUM='" + UniqueID + "'"); foreach (DataRow dr in drTemp) { dtSearchedOrdersTemp.ImportRow(dr); } dtSearchedOrdersTemp.Columns["CONFIGID"].ColumnName = "CONFIGURATION"; grItems.DataSource = dtSearchedOrdersTemp; if (dtSearchedOrdersTemp != null && dtSearchedOrdersTemp.Rows.Count > 0) { Decimal dTotalAmount = 0m; foreach (DataRow drTotal in dtSearchedOrdersTemp.Rows) { dTotalAmount += Convert.ToDecimal(drTotal["AMOUNT"]); } // txtTotalAmount.Text = Convert.ToString(dTotalAmount); frmRepairDetail.sExtendedDetailsAmount = 0m;// Convert.ToDecimal(txtTotalAmount.Text); } btnPOSItemSearch.Enabled = false; btnAddItem.Enabled = false; btnSubmit.Enabled = false; btnEdit.Enabled = false; btnDelete.Enabled = false; btnClear.Enabled = false; }