Beispiel #1
0
        public bool InsertResultGreet(QuestionsModel Res, out string Err)
        {
            Err = "";
            try
            {
                if (_VoitingBaseDataContext.QuestGreetings.Any(a => a.EmpId == Res.Empl.Id && a.AnketaId == AnketaId))
                {
                    return(true);
                }

                QuestGreetings qg = new QuestGreetings()
                {
                    Greet1     = Res.Greet1.TrimEnd(),
                    Greet2     = Res.Greet2.TrimEnd(),
                    Greet3     = Res.Greet3.TrimEnd(),
                    EmpId      = Res.Empl.Id,
                    AnswerDate = DateTime.Now,
                    CompName   = Res.CompName,
                    IP         = Res.IpAddress,
                    Agent      = Res.UserAgent,
                    AnketaId   = AnketaId
                };
                _VoitingBaseDataContext.QuestGreetings.InsertOnSubmit(qg);
                _VoitingBaseDataContext.SubmitChanges();
                return(true);
            }
            catch (Exception e)
            {
                Err = e.Message;
                return(false);
            }
        }
Beispiel #2
0
 partial void DeleteQuestGreetings(QuestGreetings instance);
Beispiel #3
0
 partial void UpdateQuestGreetings(QuestGreetings instance);
Beispiel #4
0
 partial void InsertQuestGreetings(QuestGreetings instance);