public async Task DeleteMSPVacancieType(long Id) { try { await Task.Run(() => ManageMSPVacancieType.DeleteMSPVacancieType(Id)); } catch (Exception) { throw; } }
//public async Task<VacancySkillsCreateModel> UpdateVacancySkill(VacancySkillsCreateModel model) //{ // try // { // tblVacancieSkill data = await Task.Run(() => ManageVacancySkills.UpdateVacancySkills(model.ConvertTotblVacancySkill())); // return data.ConvertToVacancySkill(); // } // catch (Exception) // { // throw; // } //} //public async Task<VacancyLocationsCreateModel> UpdateVacancyLocation(VacancyLocationsCreateModel model) //{ // try // { // tblVacancyLocation data = await Task.Run(() => ManageVacancyLocations.UpdateVacancyLocation(model.ConvertTotblVacancyLocation())); // return data.ConvertToVacancyLocation(); // } // catch (Exception) // { // throw; // } //} //public async Task<VacancySuppliersCreateModel> UpdateVacancySupplier(VacancySuppliersCreateModel model) //{ // try // { // tblVacancySupplier data = await Task.Run(() => ManageVacancySuppliers.UpdateVacancySupplier(model.ConvertTotblVacancySupplier())); // return data.ConvertToVacancySupplier(); // } // catch (Exception) // { // throw; // } //} public async Task <MSPVacancieTypeCreateModel> UpdateMSPVacancieType(MSPVacancieTypeCreateModel model) { try { tblMSPVacancieType data = await Task.Run(() => ManageMSPVacancieType.UpdateMSPVacancieType(model.ConvertTotblMSPVacancieType())); return(data.ConvertToMSPVacancieType()); } catch (Exception) { throw; } }
public async Task <MSPVacancieTypeCreateModel> CreateMSPVacancieType(MSPVacancieTypeCreateModel data) { try { long mspId = Convert.ToInt64(ConfigurationManager.AppSettings["MSP_ID"]); data.mspId = data.mspId != 0 ? data.mspId : mspId; tblMSPVacancieType dataMSPVacancieType = await Task.Run(() => ManageMSPVacancieType.InsertMSPVacancieType(data.ConvertTotblMSPVacancieType())); return(dataMSPVacancieType.ConvertToMSPVacancieType()); } catch (Exception) { throw; } }
//public async Task<List<VacancySkillsCreateModel>> GetVacancySkills(long Id) //{ // try // { // List<VacancySkillsCreateModel> data = null; // List<tblVacancieSkill> res = await Task.Run(() => ManageVacancySkills.GetVacancySkills(Id)); // data = res.Select(x => x.ConvertToVacancySkill()).ToList(); // return data; // } // catch (Exception) // { // throw; // } //} //public async Task<List<VacancyLocationsCreateModel>> GetVacancyLocations(long Id) //{ // try // { // List<VacancyLocationsCreateModel> data = null; // List<tblVacancyLocation> res = await Task.Run(() => ManageVacancyLocations.GetVacancyLocations(Id)); // data = res.Select(x => x.ConvertToVacancyLocation()).ToList(); // return data; // } // catch (Exception) // { // throw; // } //} //public async Task<List<VacancySuppliersCreateModel>> GetVacancySupplier(long Id) //{ // try // { // List<VacancySuppliersCreateModel> data = null; // List<tblVacancySupplier> res = await Task.Run(() => ManageVacancySuppliers.GetVacancySuppliers(Id)); // data = res.Select(x => x.ConvertToVacancySupplier()).ToList(); // return data; // } // catch (Exception ex) // { // throw; // } //} public async Task <List <MSPVacancieTypeCreateModel> > GetMSPVacancieType(MSPVacancieTypeCreateModel data) { try { long Id = data.mspId != 0 ? Convert.ToInt64(data.mspId) : 0; long id = Convert.ToInt64(ConfigurationManager.AppSettings["MSP_ID"]); Id = Id != 0 ? Id : id; List <MSPVacancieTypeCreateModel> model = null; List <tblMSPVacancieType> dataVT = null; dataVT = await Task.Run(() => ManageMSPVacancieType.GetMSPVacancieTypes(Id)); model = dataVT.Select(a => a.ConvertToMSPVacancieType()).ToList(); return(model); } catch (Exception ex) { throw; } }