public ActionResult GetToVoidInfoJosn(string keyValue) { string receive_id = feereceivebll.Getreceive_id(keyValue); if (!string.IsNullOrEmpty(receive_id)) { OtherincomeBLL otherincomebll = new OtherincomeBLL(); var data = otherincomebll.GetEntitys(receive_id, 0); data.type = "0"; return(ToJsonResult(data)); } else { OtherincomeBLL bll = new OtherincomeBLL(); string incomeid = bll.Getincomeid(keyValue); if (!string.IsNullOrEmpty(incomeid)) { var data = bll.GetEntitys(incomeid, 1); data.type = "1"; return(ToJsonResult(data)); } else { return(Error("发票输入不正确,请输入正确的发票号码!")); } } }
public ActionResult ToVoidForm(string keyValue, int Type) { FeeticketBLL bll_f = new FeeticketBLL(); FeeticketEntity Fent = bll_f.GetEntity(keyValue); string DepartmentId = OperatorProvider.Provider.Current().DepartmentId; if (Fent == null) { return(Error("操作错误!")); } else if (Fent.ticket_status == 2) { return(Error("发票已经归档无法作废,请与财务部联系!")); } else if ((Fent.ticket_status != 1) && (Fent.ticket_status != 10)) { return(Error("发票尚未使用无法作废,请与财务部联系!")); } else if (Fent.dept_id != DepartmentId) { return(Error("发票不属于本部门无法作废,请与财务部联系!!")); } else { string name = OperatorProvider.Provider.Current().UserName; if (Type == 0) { if (feereceivebll.ToVoidForm(1, keyValue, name) > 0) { return(Success("操作成功。")); } else { return(Error("操作失败。")); } } else { OtherincomeBLL bll_o = new OtherincomeBLL(); bll_o.ToVoidForm(name, keyValue); return(Success("操作成功。")); } } }