Ejemplo n.º 1
0
 //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);
 }
Ejemplo n.º 2
0
 //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);
 }