//Copy data protected override void CopyData(int VoucherId, bool appendMode) { data.applicationDataSet.VoucherDetailsDataTable tmpTbl = new data.applicationDataSet.VoucherDetailsDataTable(); this.voucherDetailsTableAdapter.FillByVoucherId(tmpTbl, VoucherId); if (!appendMode) { this.myApplicationDataSet.VoucherDetails.Clear(); } data.applicationDataSet.VoucherDetailsRow dr; for (int idx = 0; idx < tmpTbl.Rows.Count; idx++) { dr = myApplicationDataSet.VoucherDetails.NewVoucherDetailsRow(); dr.ItemArray = tmpTbl[idx].ItemArray; myApplicationDataSet.VoucherDetails.AddVoucherDetailsRow(dr); } ShowSubTotal(); this.ShowMessage(""); base.CopyData(VoucherId, appendMode); }
//Copy data protected override void CopyData(int VoucherId,bool appendMode) { data.applicationDataSet.VoucherDetailsDataTable tmpTbl = new data.applicationDataSet.VoucherDetailsDataTable(); this.voucherDetailsTableAdapter.FillByVoucherId(tmpTbl, VoucherId); if (!appendMode) this.myApplicationDataSet.VoucherDetails.Clear(); data.applicationDataSet.VoucherDetailsRow dr; for (int idx=0; idx < tmpTbl.Rows.Count;idx++) { dr = myApplicationDataSet.VoucherDetails.NewVoucherDetailsRow(); dr.ItemArray = tmpTbl[idx].ItemArray; myApplicationDataSet.VoucherDetails.AddVoucherDetailsRow(dr); } ShowSubTotal(); this.ShowMessage(""); base.CopyData(VoucherId, appendMode); }