public HtmlDataOperRetDto EditSingleZtCode(Dto.EditZtCodeDto input) { ZtCode inputZtCode = input.MapTo <ZtCode>(); _ztRep.Update(inputZtCode); var ret = new HtmlDataOperRetDto(); ret.Code = 1; ret.Message = "更新成功!"; return(ret); }
public HtmlDataOperRetDto AddSingleZtCode(CreateZtCodeDto input) { ZtCode addZtCode = input.MapTo <ZtCode>(); int tempId = _ztRep.InsertAndGetId(addZtCode); var ret = new HtmlDataOperRetDto(); ret.Code = tempId; if (tempId > 0) { ret.Message = "添加成功!"; } else { ret.Message = "添加失败"; } return(ret); }