//-------------------------------------------------------------------- // Build the Insert command String //-------------------------------------------------------------------- private String BuildInsertCommandTrainerArea(TrainerArea area) { String command; StringBuilder sb = new StringBuilder(); // use a string builder to create the dynamic string sb.AppendFormat("Values('{0}', '{1}' )", area.TrainerCode.ToString(), area.AreaCode.ToString()); String prefix = "INSERT INTO SM_TrainerArea" + "(TrainerCode , AreaCode) "; command = prefix + sb.ToString(); return(command); }
public int UpdateTrainerArea([FromBody] TrainerArea [] t) { TrainerArea trainer = new TrainerArea(); return(trainer.UpdateTrainerArea(t)); }
// POST: api/TrainerArea public int Post([FromBody] TrainerArea[] area) { TrainerArea a = new TrainerArea(); return(a.insert(area)); }
public List <TrainerArea> getTrainerArea(string trainerCode) { TrainerArea ta = new TrainerArea(); return(ta.GetTrainerArea(trainerCode)); }