Example #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();
                }
            }
        }
Example #2
0
 partial void DeleteProfessions(Professions instance);
Example #3
0
 partial void UpdateProfessions(Professions instance);
Example #4
0
 partial void InsertProfessions(Professions instance);