public List <Country> GetCountries() { using (ServerValidation_Db db = new ServerValidation_Db()) { return(db.Countries.ToList()); } }
public List <FormOfPayment> GetPaymentTypes() { using (ServerValidation_Db db = new ServerValidation_Db()) { return(db.FormOfPayments.ToList()); } }
public List <MessageTheme> GetMessageThemes() { using (ServerValidation_Db db = new ServerValidation_Db()) { return(db.MessageThemes.ToList()); } }
public List <TariffsView> GetTariffsViews() { using (ServerValidation_Db db = new ServerValidation_Db()) { return(db.TariffsViews.ToList()); } }
public List <DepartureType> GetDepartureTypes() { using (ServerValidation_Db db = new ServerValidation_Db()) { return(db.DepartureTypes.ToList()); } }
public bool CreateFeedback(Feedback feedback) { using (ServerValidation_Db db = new ServerValidation_Db()) { db.Feedbacks.Add(feedback); try { db.SaveChanges(); } catch (Exception e) { return(false); } return(true); } }
public bool CreateTrack(DescriptionOfGood description) { using (ServerValidation_Db db = new ServerValidation_Db()) { db.DescriptionOfGoods.Add(description); try { db.SaveChanges(); } catch (Exception e) { return(false); } return(true); } }
public bool CreateOrder(Sender sender) { using (ServerValidation_Db db = new ServerValidation_Db()) { db.Senders.Add(sender); try { db.SaveChanges(); } catch (Exception e) { return(false); } return(true); } }