private void timer1_Tick(object sender, EventArgs e) { int iInvType = 0; if (cbbInvType.SelectedValue.ToString() == "1") { iInvType = 0; } else { iInvType = 2; } if (PublicUtility.ValidCustInfo(iInvType, gridView1) == 0) { iCurrentItemId = -1; if (Invoice(0) == 1) { MessageBox.Show(sRetMsg); return; } /*for (int i = 0; i < gridView1.RowCount - 1; i++) * { * Thread.Sleep(int.Parse(upTimerLong.Value.ToString())); * //if (gridView1.SelectedRowsCount > 0) * //{ * // iCurrentItemId = gridView1.FocusedRowHandle; * //后台生成发票明细 * if (Invoice(i) == 1) { MessageBox.Show(sRetMsg); return; } * // } * }*/ GetData(); } }
private void btnBill_Click_1(object sender, EventArgs e) { int iInvType = 0; if (cbbInvType.SelectedValue.ToString() == "1") { iInvType = 0; } else { iInvType = 2; } if (PublicUtility.ValidCustInfo(iInvType, gridView1) == 0) { foreach (int i in gridView1.GetSelectedRows()) { if (Invoice(i) == 1) { MessageBox.Show(sRetMsg); return; } } GetData(); } }