private void B_ok_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(glookup_slt.EditValue.ToString())) { glookup_slt.ErrorImageOptions.Alignment = ErrorIconAlignment.MiddleRight; glookup_slt.ErrorText = "请先选择一个告别厅!"; return; } if (dateEdit_so005.EditValue == null || string.IsNullOrEmpty(dateEdit_so005.EditValue.ToString())) { dateEdit_so005.ErrorImageOptions.Alignment = ErrorIconAlignment.MiddleRight; dateEdit_so005.ErrorText = "请输入告别时间!"; return; } string s_si001 = glookup_slt.EditValue.ToString(); //告别厅编号 DateTime so005 = (DateTime)dateEdit_so005.EditValue; //告别日期 int result = FireAction.FireSales_04(AC001, s_si001, so005, Envior.cur_userId ); if (result > 0) { DialogResult = DialogResult.OK; this.Dispose(); } }
private void b_ok_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(glookup_slt.EditValue.ToString())) { glookup_slt.ErrorImageOptions.Alignment = ErrorIconAlignment.MiddleRight; glookup_slt.ErrorText = "请先选择一个告别厅!"; return; } if (dateEdit_so005.EditValue == null || string.IsNullOrEmpty(dateEdit_so005.EditValue.ToString())) { dateEdit_so005.ErrorImageOptions.Alignment = ErrorIconAlignment.MiddleRight; dateEdit_so005.ErrorText = "请输入告别时间!"; return; } string s_si001 = glookup_slt.EditValue.ToString(); //告别厅编号 DateTime so005 = (DateTime)dateEdit_so005.EditValue; //告别日期 if (String.IsNullOrEmpty(MiscAction.GetItemInvoiceType(s_si001))) { XtraMessageBox.Show("选择的行尚未设置发票类别!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (SALESTYPE == "0") //火化业务 { int result = FireAction.FireSales_04(AC001, s_si001, so005, Envior.cur_userId ); if (result > 0) { DialogResult = DialogResult.OK; this.Close(); } } else if (SALESTYPE == "1") //临时性销售 { DialogResult = DialogResult.OK; this.swapdata["ITEMID"] = s_si001; this.Close(); } }