public Int32 postTerminal() { try { Data.MstTerminal newTerminal = new Data.MstTerminal(); newTerminal.Terminal = "n/a"; db.MstTerminals.InsertOnSubmit(newTerminal); db.SubmitChanges(); return(newTerminal.Id); } catch (Exception e) { return(0); } }
public int Post(Models.MstTerminal terminal) { try { Data.MstTerminal newTerminal = new Data.MstTerminal(); newTerminal.Terminal = terminal.Terminal; db.MstTerminals.InsertOnSubmit(newTerminal); db.SubmitChanges(); return newTerminal.Id; } catch { return 0; } }