public IActionResult Put(int id, [FromBody] Descipline value) { if (value == null) { return(BadRequest()); } _repoWrapper.Descipline.Update(value); _repoWrapper.Save(); return(CreatedAtRoute("GetDescipline", new { Id = value.Id }, value)); }
public Descipline BizAction(PlaceDesciplineDto inputData) { if (string.IsNullOrWhiteSpace(inputData.Descipline.Name)) { AddError("Descipline Name is Required."); return(null); } var desStatus = Descipline.CreateDesciplineFactory( inputData.Descipline.Name, inputData.Descipline.Description, inputData.Descipline.ProjectIds); CombineErrors(desStatus); if (!HasErrors) { _dbAccess.Add(desStatus.Result); } return(HasErrors ? null : desStatus.Result); }
public void SelectDropdownNiche() { NICHE _objDiscipline = new NICHE(); DataSet ds = _objDiscipline.Select_Niche("Discipline"); List <Descipline> _Discipline = new List <Descipline>(); if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { foreach (DataRow row in ds.Tables[0].Rows) { Descipline _obj = new Descipline(); _obj.Discipline_ID = (row["Discipline_ID"].ToString()); _obj.Discipline = row["Discipline"].ToString(); _Discipline.Add(_obj); } } } ViewBag.DesciplineNiche = _Discipline; }
public void SelectDropdown() { Descipline obj = new Descipline(); DisciplineRepository _objNationality = new DisciplineRepository(); DataSet ds = _objNationality.Select_decipline("1"); List <Descipline> _Descipline = new List <Descipline>(); if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { foreach (DataRow row in ds.Tables[0].Rows) { Descipline _objDescipline = new Descipline(); _objDescipline.Discipline_ID = (row["Discipline_ID"].ToString()); _objDescipline.Discipline = row["Discipline"].ToString(); _Descipline.Add(_objDescipline); } } } ProgramLevels objpro = new ProgramLevels(); ProgramLevelsRepository _objpro = new ProgramLevelsRepository(); DataSet ds1 = _objpro.Select_ProgramLevel("1"); List <ProgramLevels> _ProgramLevels = new List <ProgramLevels>(); if (ds1 != null) { if (ds1.Tables[0].Rows.Count > 0) { foreach (DataRow row in ds1.Tables[0].Rows) { ProgramLevels _objProgramLevels = new ProgramLevels(); _objProgramLevels.ProgramLevel_Id = (row["ProgramLevel_Id"].ToString()); _objProgramLevels.ProgramLevel = row["ProgramLevel"].ToString(); _ProgramLevels.Add(_objProgramLevels); } } } CurrencyRepository _objRepo = new CurrencyRepository(); DataSet dsContry = _objRepo.select_Currency(); List <Currency> _ListCurrency = new List <Currency>(); if (dsContry != null) { if (dsContry.Tables[0].Rows.Count > 0) { foreach (DataRow row in dsContry.Tables[0].Rows) { Currency _objcont = new Currency(); _objcont.Currency_Id = row["Currency_Id"].ToString(); _objcont.CurrencyCode = row["CurrencyCode"].ToString(); _objcont.CurrencyName = row["CurrencyName"].ToString(); _ListCurrency.Add(_objcont); } } } ViewBag.Currency = _ListCurrency; ViewBag.Descipline = _Descipline; ViewBag.ProgramLevels = _ProgramLevels; }
public void Delete(Descipline descipline) { _context.Desciplines.Remove(descipline); }
public void Add(Descipline descipline) { _context.Desciplines.Add(descipline); }