private void btnApprovalAll_Click(object sender, EventArgs e) { int successRows = 0; if (CtrlType == "未审核") { foreach (DataRow dr in ApplicationInfoTable.Rows) { if (dr["ApprovalState"].ToString() == "1" && int.Parse(dr["AppState"].ToString()) > 0) { successRows += applicationInfo.ApprovalApplication(dr["TransNo"].ToString(), Login.LoginUser, 1, DateTime.Now); } } MessageBox.Show("审批通过" + successRows + "条", "消息", MessageBoxButtons.OK, MessageBoxIcon.Information); } if (CtrlType == "最终确认") { foreach (DataRow dr in ApplicationInfoTable.Rows) { if (dr["FinalState"].ToString() == "1") { successRows += applicationInfo.FinalConfirm(dr["TransNo"].ToString()); } } MessageBox.Show("最终确认通过" + successRows + "条", "消息", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void btnFinalConfirm_Click(object sender, EventArgs e) { try { applicationInfo.FinalConfirm(applicationInfo.CtrlID); MessageBox.Show("确认完毕", "消息", MessageBoxButtons.OK, MessageBoxIcon.Warning); DialogResult = DialogResult.OK; this.Close(); } catch (Exception ex) { MessageBox.Show("确认失败", "消息", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
//确认按钮 private void btnConfirm_Click(object sender, EventArgs e) { applicationInfo.FinalConfirm(applicationInfo.TransNo); MessageBox.Show("确认完成", "消息", MessageBoxButtons.OK, MessageBoxIcon.Warning); this.Close(); }
//确认按钮 private void btnConfirm_Click(object sender, EventArgs e) { try { totalPrice = 0; foreach (DataGridViewRow dgvr in dgvApplyDetails.Rows) { if ((int)dgvr.Cells["IsSuccess"].Value == 1 && !CheckSpecial(dgvr.Cells["ItemID"].Value.ToString())) { decimal MoneyDiscont = 1; switch (dgvr.Cells["MoneyUnit"].Value.ToString()) { case "1": default: MoneyDiscont = 1; break; case "2": MoneyDiscont = EmailControl.config.USrate; break; case "3": MoneyDiscont = EmailControl.config.HKrate; break; case "4": MoneyDiscont = EmailControl.config.MOPrate; break; case "5": MoneyDiscont = EmailControl.config.SGDrate; break; case "6": MoneyDiscont = EmailControl.config.MYRrate; break; case "7": MoneyDiscont = EmailControl.config.GBPrate; break; case "8": MoneyDiscont = EmailControl.config.EURrate; break; case "9": MoneyDiscont = EmailControl.config.JPYrate; break; case "10": MoneyDiscont = EmailControl.config.TWDrate; break; } totalPrice += double.Parse(dgvr.Cells["FinalPrice"].Value.ToString()) * double.Parse(MoneyDiscont.ToString()); } } applicationInfo.StorePay(applicationInfo.TransNo, "", applicationInfo.Applicants, totalPrice, 1); applicationDetail.UpdateBuyApplicationDetail(ApplicationDetailTable, applicationInfo.TransNo); applicationInfo.FinalConfirm(applicationInfo.TransNo); MessageBox.Show("确认完成", "消息", MessageBoxButtons.OK, MessageBoxIcon.Warning); DialogResult = DialogResult.OK; this.Close(); } catch (Exception ex) { MessageBox.Show("确认失败", "消息", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }