Esempio n. 1
0
        internal static void AddProfession()
        {
            string newProfessionName = InputDialog.Show("Введите название профессии", "Создание профессии");

            if (!String.IsNullOrWhiteSpace(newProfessionName))
            {
                ITSkillsDataContext dataContext = new ITSkillsDataContext();
                var alreadyInDB = from p in dataContext.Professions
                                  where p.Profession == newProfessionName
                                  select p;
                if (alreadyInDB.Count() == 0)
                {
                    Professions newProfession = new Professions();
                    newProfession.Profession = newProfessionName;
                    dataContext.Professions.InsertOnSubmit(newProfession);
                    dataContext.SubmitChanges();
                }
            }
        }
Esempio n. 2
0
 partial void DeleteProfessions(Professions instance);
Esempio n. 3
0
 partial void UpdateProfessions(Professions instance);
Esempio n. 4
0
 partial void InsertProfessions(Professions instance);