/// <summary>
        /// Deletes a record based on primary key(s)
        /// </summary>
        internal static void Delete(int studentId)
        {
            CourseEnquiryDBContext context = new CourseEnquiryDBContext();
            var objStudent = context.Student.Where(s => s.StudentId == studentId).FirstOrDefault();

            if (objStudent != null)
            {
                context.Student.Remove(objStudent);
                context.SaveChanges();
            }
        }
示例#2
0
        /// <summary>
        /// Deletes a record based on primary key(s)
        /// </summary>
        internal static void Delete(int enrollmentId)
        {
            CourseEnquiryDBContext context = new CourseEnquiryDBContext();
            var objCourseEnrollmentInfo    = context.CourseEnrollmentInfo.Where(c => c.EnrollmentId == enrollmentId).FirstOrDefault();

            if (objCourseEnrollmentInfo != null)
            {
                context.CourseEnrollmentInfo.Remove(objCourseEnrollmentInfo);
                context.SaveChanges();
            }
        }
        /// <summary>
        /// Deletes a record based on primary key(s)
        /// </summary>
        internal static void Delete(int courseId)
        {
            CourseEnquiryDBContext context = new CourseEnquiryDBContext();
            var objCourse = context.Course.Where(c => c.CourseId == courseId).FirstOrDefault();

            if (objCourse != null)
            {
                context.Course.Remove(objCourse);
                context.SaveChanges();
            }
        }
示例#4
0
        /// <summary>
        /// Deletes a record based on primary key(s)
        /// </summary>
        internal static void Delete(int roleId)
        {
            CourseEnquiryDBContext context = new CourseEnquiryDBContext();
            var objRoleMaster = context.RoleMaster.Where(r => r.RoleId == roleId).FirstOrDefault();

            if (objRoleMaster != null)
            {
                context.RoleMaster.Remove(objRoleMaster);
                context.SaveChanges();
            }
        }
示例#5
0
        /// <summary>
        /// Deletes a record based on primary key(s)
        /// </summary>
        internal static void Delete(int userRoleId)
        {
            CourseEnquiryDBContext context = new CourseEnquiryDBContext();
            var objUserRoles = context.UserRoles.Where(u => u.UserRoleId == userRoleId).FirstOrDefault();

            if (objUserRoles != null)
            {
                context.UserRoles.Remove(objUserRoles);
                context.SaveChanges();
            }
        }
        /// <summary>
        /// Deletes a record based on primary key(s)
        /// </summary>
        internal static void Delete(int adminId)
        {
            CourseEnquiryDBContext context = new CourseEnquiryDBContext();
            var objAdmin = context.Admin.Where(a => a.AdminId == adminId).FirstOrDefault();

            if (objAdmin != null)
            {
                context.Admin.Remove(objAdmin);
                context.SaveChanges();
            }
        }
示例#7
0
        /// <summary>
        /// Deletes a record based on primary key(s)
        /// </summary>
        internal static void Delete(int workflowId)
        {
            CourseEnquiryDBContext context = new CourseEnquiryDBContext();
            var objWorkflowMaster          = context.WorkflowMaster.Where(w => w.WorkflowId == workflowId).FirstOrDefault();

            if (objWorkflowMaster != null)
            {
                context.WorkflowMaster.Remove(objWorkflowMaster);
                context.SaveChanges();
            }
        }
        /// <summary>
        /// Updates a record
        /// </summary>
        internal static void Update(Admin objAdmin)
        {
            CourseEnquiryDBContext context = new CourseEnquiryDBContext();
            Admin entAdmin = context.Admin.Where(a => a.AdminId == objAdmin.AdminId).FirstOrDefault();

            if (entAdmin != null)
            {
                entAdmin.AdminName     = objAdmin.AdminName;
                entAdmin.AdminPassword = objAdmin.AdminPassword;

                context.SaveChanges();
            }
        }
        /// <summary>
        /// Inserts a record
        /// </summary>
        internal static int Insert(Admin objAdmin)
        {
            CourseEnquiryDBContext context = new CourseEnquiryDBContext();
            Admin entAdmin = new Admin();

            entAdmin.AdminName     = objAdmin.AdminName;
            entAdmin.AdminPassword = objAdmin.AdminPassword;

            context.Admin.Add(entAdmin);
            context.SaveChanges();

            return(entAdmin.AdminId);
        }
示例#10
0
        /// <summary>
        /// Inserts a record
        /// </summary>
        internal static int Insert(UserRoles objUserRoles)
        {
            CourseEnquiryDBContext context = new CourseEnquiryDBContext();
            UserRoles entUserRoles         = new UserRoles();

            entUserRoles.UserId = objUserRoles.UserId;
            entUserRoles.RoleId = objUserRoles.RoleId;
            entUserRoles.Status = objUserRoles.Status;

            context.UserRoles.Add(entUserRoles);
            context.SaveChanges();

            return(entUserRoles.UserRoleId);
        }
示例#11
0
        /// <summary>
        /// Updates a record
        /// </summary>
        internal static void Update(CourseEnrollmentInfo objCourseEnrollmentInfo)
        {
            CourseEnquiryDBContext context = new CourseEnquiryDBContext();
            CourseEnrollmentInfo   entCourseEnrollmentInfo = context.CourseEnrollmentInfo.Where(c => c.EnrollmentId == objCourseEnrollmentInfo.EnrollmentId).FirstOrDefault();

            if (entCourseEnrollmentInfo != null)
            {
                entCourseEnrollmentInfo.CourseId  = objCourseEnrollmentInfo.CourseId;
                entCourseEnrollmentInfo.StudentId = objCourseEnrollmentInfo.StudentId;
                entCourseEnrollmentInfo.Comments  = objCourseEnrollmentInfo.Comments;

                context.SaveChanges();
            }
        }
示例#12
0
        /// <summary>
        /// Updates a record
        /// </summary>
        internal static void Update(UserRoles objUserRoles)
        {
            CourseEnquiryDBContext context = new CourseEnquiryDBContext();
            UserRoles entUserRoles         = context.UserRoles.Where(u => u.UserRoleId == objUserRoles.UserRoleId).FirstOrDefault();

            if (entUserRoles != null)
            {
                entUserRoles.UserId = objUserRoles.UserId;
                entUserRoles.RoleId = objUserRoles.RoleId;
                entUserRoles.Status = objUserRoles.Status;

                context.SaveChanges();
            }
        }
        /// <summary>
        /// Updates a record
        /// </summary>
        internal static void Update(Student objStudent)
        {
            CourseEnquiryDBContext context = new CourseEnquiryDBContext();
            Student entStudent             = context.Student.Where(s => s.StudentId == objStudent.StudentId).FirstOrDefault();

            if (entStudent != null)
            {
                entStudent.StudentName     = objStudent.StudentName;
                entStudent.EmailId         = objStudent.EmailId;
                entStudent.ContactNo       = objStudent.ContactNo;
                entStudent.StudentPassword = objStudent.StudentPassword;

                context.SaveChanges();
            }
        }
        /// <summary>
        /// Updates a record
        /// </summary>
        internal static void Update(Course objCourse)
        {
            CourseEnquiryDBContext context = new CourseEnquiryDBContext();
            Course entCourse = context.Course.Where(c => c.CourseId == objCourse.CourseId).FirstOrDefault();

            if (entCourse != null)
            {
                entCourse.CourseName = objCourse.CourseName;
                entCourse.StartDate  = objCourse.StartDate;
                entCourse.EndDate    = objCourse.EndDate;
                entCourse.Fees       = objCourse.Fees;

                context.SaveChanges();
            }
        }
        /// <summary>
        /// Inserts a record
        /// </summary>
        internal static int Insert(Course objCourse)
        {
            CourseEnquiryDBContext context = new CourseEnquiryDBContext();
            Course entCourse = new Course();

            entCourse.CourseName = objCourse.CourseName;
            entCourse.StartDate  = objCourse.StartDate;
            entCourse.EndDate    = objCourse.EndDate;
            entCourse.Fees       = objCourse.Fees;

            context.Course.Add(entCourse);
            context.SaveChanges();

            return(entCourse.CourseId);
        }
示例#16
0
        /// <summary>
        /// Inserts a record
        /// </summary>
        internal static int Insert(CourseEnrollmentInfo objCourseEnrollmentInfo)
        {
            CourseEnquiryDBContext context = new CourseEnquiryDBContext();
            CourseEnrollmentInfo   entCourseEnrollmentInfo = new CourseEnrollmentInfo();

            entCourseEnrollmentInfo.EnrollmentId = objCourseEnrollmentInfo.EnrollmentId;
            entCourseEnrollmentInfo.CourseId     = objCourseEnrollmentInfo.CourseId;
            entCourseEnrollmentInfo.StudentId    = objCourseEnrollmentInfo.StudentId;
            entCourseEnrollmentInfo.Comments     = objCourseEnrollmentInfo.Comments;

            context.CourseEnrollmentInfo.Add(entCourseEnrollmentInfo);
            context.SaveChanges();

            return(entCourseEnrollmentInfo.EnrollmentId);
        }
        /// <summary>
        /// Inserts a record
        /// </summary>
        internal static int Insert(Student objStudent)
        {
            CourseEnquiryDBContext context = new CourseEnquiryDBContext();
            Student entStudent             = new Student();

            entStudent.StudentName     = objStudent.StudentName;
            entStudent.EmailId         = objStudent.EmailId;
            entStudent.ContactNo       = objStudent.ContactNo;
            entStudent.StudentPassword = objStudent.StudentPassword;

            context.Student.Add(entStudent);
            context.SaveChanges();

            return(entStudent.StudentId);
        }
示例#18
0
        /// <summary>
        /// Inserts a record
        /// </summary>
        internal static int Insert(RoleMaster objRoleMaster)
        {
            CourseEnquiryDBContext context       = new CourseEnquiryDBContext();
            RoleMaster             entRoleMaster = new RoleMaster();

            entRoleMaster.RoleDescription = objRoleMaster.RoleDescription;
            entRoleMaster.CreatedOn       = objRoleMaster.CreatedOn;
            entRoleMaster.CreatedBy       = objRoleMaster.CreatedBy;
            entRoleMaster.ModifiedOn      = objRoleMaster.ModifiedOn;
            entRoleMaster.ModifiedBy      = objRoleMaster.ModifiedBy;

            context.RoleMaster.Add(entRoleMaster);
            context.SaveChanges();

            return(entRoleMaster.RoleId);
        }
示例#19
0
        /// <summary>
        /// Updates a record
        /// </summary>
        internal static void Update(RoleMaster objRoleMaster)
        {
            CourseEnquiryDBContext context       = new CourseEnquiryDBContext();
            RoleMaster             entRoleMaster = context.RoleMaster.Where(r => r.RoleId == objRoleMaster.RoleId).FirstOrDefault();

            if (entRoleMaster != null)
            {
                entRoleMaster.RoleDescription = objRoleMaster.RoleDescription;
                entRoleMaster.CreatedOn       = objRoleMaster.CreatedOn;
                entRoleMaster.CreatedBy       = objRoleMaster.CreatedBy;
                entRoleMaster.ModifiedOn      = objRoleMaster.ModifiedOn;
                entRoleMaster.ModifiedBy      = objRoleMaster.ModifiedBy;

                context.SaveChanges();
            }
        }
示例#20
0
        /// <summary>
        /// Updates a record
        /// </summary>
        internal static void Update(WorkflowMaster objWorkflowMaster)
        {
            CourseEnquiryDBContext context           = new CourseEnquiryDBContext();
            WorkflowMaster         entWorkflowMaster = context.WorkflowMaster.Where(w => w.WorkflowId == objWorkflowMaster.WorkflowId).FirstOrDefault();

            if (entWorkflowMaster != null)
            {
                entWorkflowMaster.WorkflowName     = objWorkflowMaster.WorkflowName;
                entWorkflowMaster.LevelOfApprovals = objWorkflowMaster.LevelOfApprovals;
                entWorkflowMaster.CreatedBy        = objWorkflowMaster.CreatedBy;
                entWorkflowMaster.CreatedOn        = objWorkflowMaster.CreatedOn;
                entWorkflowMaster.Updatedby        = objWorkflowMaster.Updatedby;
                entWorkflowMaster.Updatedon        = objWorkflowMaster.Updatedon;

                context.SaveChanges();
            }
        }
示例#21
0
        /// <summary>
        /// Inserts a record
        /// </summary>
        internal static int Insert(WorkflowMaster objWorkflowMaster)
        {
            CourseEnquiryDBContext context           = new CourseEnquiryDBContext();
            WorkflowMaster         entWorkflowMaster = new WorkflowMaster();

            entWorkflowMaster.WorkflowName     = objWorkflowMaster.WorkflowName;
            entWorkflowMaster.LevelOfApprovals = objWorkflowMaster.LevelOfApprovals;
            entWorkflowMaster.CreatedBy        = objWorkflowMaster.CreatedBy;
            entWorkflowMaster.CreatedOn        = objWorkflowMaster.CreatedOn;
            entWorkflowMaster.Updatedby        = objWorkflowMaster.Updatedby;
            entWorkflowMaster.Updatedon        = objWorkflowMaster.Updatedon;

            context.WorkflowMaster.Add(entWorkflowMaster);
            context.SaveChanges();

            return(entWorkflowMaster.WorkflowId);
        }
示例#22
0
        /// <summary>
        /// Inserts a record
        /// </summary>
        internal static int Insert(UserMaster objUserMaster)
        {
            CourseEnquiryDBContext context       = new CourseEnquiryDBContext();
            UserMaster             entUserMaster = new UserMaster();

            entUserMaster.UserName   = objUserMaster.UserName;
            entUserMaster.Password   = objUserMaster.Password;
            entUserMaster.Email      = objUserMaster.Email;
            entUserMaster.CreatedOn  = objUserMaster.CreatedOn;
            entUserMaster.CreatedBy  = objUserMaster.CreatedBy;
            entUserMaster.ModifiedOn = objUserMaster.ModifiedOn;
            entUserMaster.ModifiedBy = objUserMaster.ModifiedBy;

            context.UserMaster.Add(entUserMaster);
            context.SaveChanges();

            return(entUserMaster.UserId);
        }
示例#23
0
        /// <summary>
        /// Updates a record
        /// </summary>
        internal static void Update(UserMaster objUserMaster)
        {
            CourseEnquiryDBContext context       = new CourseEnquiryDBContext();
            UserMaster             entUserMaster = context.UserMaster.Where(u => u.UserId == objUserMaster.UserId).FirstOrDefault();

            if (entUserMaster != null)
            {
                entUserMaster.UserName   = objUserMaster.UserName;
                entUserMaster.Password   = objUserMaster.Password;
                entUserMaster.Email      = objUserMaster.Email;
                entUserMaster.CreatedOn  = objUserMaster.CreatedOn;
                entUserMaster.CreatedBy  = objUserMaster.CreatedBy;
                entUserMaster.ModifiedOn = objUserMaster.ModifiedOn;
                entUserMaster.ModifiedBy = objUserMaster.ModifiedBy;

                context.SaveChanges();
            }
        }