| | |
| | | if (UpdateUnitStatus(db, entity.Id, "B")) |
| | | return 1; |
| | | break; |
| | | case "2": |
| | | if (InsertUnit(db, entity)) |
| | | return 1; |
| | | break; |
| | | case "3": |
| | | if (DeleteUnit(db, entity.Id)) |
| | | return 1; |
| | | break; |
| | | case "2": |
| | | case "4": |
| | | if (InsertOrUpdate(db, entity)) |
| | | return 1; |
| | |
| | | if (!UpdateUnitStatusBatch(db, unitGroup.Value, "B")) |
| | | throw new NotImplementedException("禁用失败"); |
| | | break; |
| | | case "2": |
| | | if (!InsertUnitBatch(db, unitGroup.Value)) |
| | | throw new NotImplementedException("插入失败"); |
| | | break; |
| | | case "3": |
| | | if (!DeleteUnitBatch(db, unitGroup.Value)) |
| | | throw new NotImplementedException("删除失败"); |
| | | break; |
| | | case "2": |
| | | case "4": |
| | | if (!InsertOrUpdateBatch(db, unitGroup.Value)) |
| | | throw new NotImplementedException("同步失败"); |
| | |
| | | Fnumber = unit.FNumber, |
| | | Fname = unit.FName, |
| | | Funitgroupid = unit.FUnitGroupId, |
| | | Fconvertdenominator = unit.FConvertDenominator, |
| | | Fconvertdenominator = Convert.ToDouble(unit.ConvertDenominator), |
| | | Fcurrentunitid = unit.FCurrentUnitId, |
| | | Fconvertnumerator = unit.FConvertNumerator, |
| | | Fbaseunit = unit.FBaseUnit, |