Exemplo n.º 1
0
        public int?InsertHeader(CompetencyDefHeader header)
        {
            var result = (int?)null;

            using (var context = new SSITrainingEntities())
            {
                try
                {
                    result = context.sp_CACompetency_CompetencyDefHeader_Insert(header.JobTitleID, header.JobRoleID, header.JobResponsibilityID, header.Description, header.PassingGrade,
                                                                                header.NotifyDays, header.NotifyEmail, header.RecurrenceQty, header.UOMSchedulingRecurrenceID, header.Failure_RecurrenceQty, header.Failure_UOMSchedulingRecurrenceID,
                                                                                Convert.ToInt32(Session["UserID"])).FirstOrDefault();

                    header.CompDefHeaderID = Convert.ToInt32(result);
                }
                catch (Exception ex)
                {
                }
                return(result);
            }
        }