public void CreateOrUpdateDescription(TableDescriptionDto input) { if (input.tableIndex == 1)//Rolescategory { var client = new RolesCategory() { Id = input.Id, Description = input.Description }; _rolescategory.InsertOrUpdate(client); } else if (input.tableIndex == 2)//RepairType { var client = new RepairTypes() { Id = input.Id, Description = input.Description }; _repairtypes.InsertOrUpdate(client); } else if (input.tableIndex == 3)//QuoteStatus { var client = new QuoteStatus() { Id = input.Id, Description = input.Description }; _quotestatus.InsertOrUpdate(client); } else if (input.tableIndex == 4)//JobStatus { var client = new Jobstatus() { Id = input.Id, Description = input.Description }; _jobstatus.InsertOrUpdate(client); } else if (input.tableIndex == 10)//JobstatusMask { var client = new JobstatusMask() { Id = input.Id, Description1 = input.Description }; _jobstatusmask.InsertOrUpdate(client); } }
public void ChangeStatus(StatusDto input) { if (input.tableIndex == 1)//Rolescategory { var client = new RolesCategory() { Id = input.Id, Enabled = input.Status }; _rolescategory.Update(client); } else if (input.tableIndex == 2)//RepairType { var client = new RepairTypes() { Id = input.Id, Enabled = input.Status }; _repairtypes.Update(client); } else if (input.tableIndex == 3)//QuoteStatus { var client = new QuoteStatus() { Id = input.Id, Enabled = input.Status }; _quotestatus.Update(client); } else if (input.tableIndex == 10)//JobstatusMask { var client = new JobstatusMask() { Id = input.Id, Enabled = input.Status }; _jobstatusmask.Update(client); } }