|
|
@@ -105,10 +105,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers |
|
|
|
public ActionResult SaveForm(string keyValue, string strEntity) |
|
|
|
{ |
|
|
|
DtInvoiceEntity entity = strEntity.ToObject<DtInvoiceEntity>(); |
|
|
|
dtInvoiceIBLL.SaveEntity(keyValue,entity); |
|
|
|
if (string.IsNullOrEmpty(keyValue)) |
|
|
|
var InvoiceCode = dtInvoiceIBLL.GetTicketEntity(entity.InvoiceNo); |
|
|
|
if (string.IsNullOrEmpty(keyValue) && InvoiceCode != null) |
|
|
|
{ |
|
|
|
return Fail("编码已存在,请重新输入!"); |
|
|
|
} |
|
|
|
else if (!string.IsNullOrEmpty(keyValue) && (InvoiceCode != null && InvoiceCode.Id != keyValue)) |
|
|
|
{ |
|
|
|
return Fail("编码已存在,请重新输入!"); |
|
|
|
} |
|
|
|
dtInvoiceIBLL.SaveEntity(keyValue,entity); |
|
|
|
return Success("保存成功!"); |
|
|
|
} |
|
|
|
#endregion |
|
|
|