| | |
| | | /// <exception cref="NotImplementedException"></exception> |
| | | public async Task AddPrintTemplate(SysPrintTemplate model, int userid) |
| | | { |
| | | if (model.Status == "1") |
| | | { |
| | | await Db.Updateable<SysPrintTemplate>().SetColumns(s => s.Status == "0").Where(s => s.Type == model.Type && model.Status == "1").ExecuteCommandAsync(); |
| | | } |
| | | model.CreateTime = DateTime.Now; |
| | | model.CreateUser = userid; |
| | | await Db.Insertable(model).ExecuteCommandAsync(); |
| | |
| | | /// <exception cref="NotImplementedException"></exception> |
| | | public async Task EditPrintTemplate(SysPrintTemplate model, int userid) |
| | | { |
| | | if (model.Status == "1") |
| | | { |
| | | await Db.Updateable<SysPrintTemplate>().SetColumns(s => s.Status == "0").Where(s => s.Type == model.Type && model.Status == "1").ExecuteCommandAsync(); |
| | | } |
| | | model.UpdateTime = DateTime.Now; |
| | | model.UpdateUser = userid; |
| | | await Db.Updateable(model).UpdateColumns(it => new { it.Name, it.Type, it.Status, it.PositionJson, it.UpdateTime, it.UpdateUser }).ExecuteCommandAsync(); |