Esempio n. 1
0
        public RedirectToRouteResult CoureSalesMaster(CourseSalesMaster courseSalesMaster)
        {
            courseSalesMaster.IsActive          = true;
            courseSalesMaster.CreatedBy         = USER_ID;
            courseSalesMaster.CreatedOn         = UTILITY.SINGAPORETIME;
            courseSalesMaster.ModifiedBy        = USER_ID;
            courseSalesMaster.ModifiedOn        = UTILITY.SINGAPORETIME;
            courseSalesMaster.ConfirmOrDropDate = UTILITY.SINGAPORETIME;

            courseSalesMaster.Id = new CourseSalesMasterBO().SaveCourseSalesMaster(courseSalesMaster);
            return(RedirectToAction("CourseSalesMasterList"));

            //var courseSalesMasterVm = new CourseSalesMasterVm
            //{
            //    eduProductList = new EduProductBO().GetList().AsEnumerable(),
            //    branchList = new BranchBO().GetList().AsEnumerable(),
            //    monthList = GetMonthData(),
            //    courseSalesMaster = courseSalesMaster
            //};

            //courseSalesMaster = new CourseSalesMasterBO()
            //                                .GetCourseSalesMaster(new CourseSalesMaster { Id = courseSalesMaster.Id });

            //courseSalesMasterVm.courseList = new CourseBO()
            //                                    .GetCoursesByProduct(courseSalesMaster.Product)
            //                                    .AsEnumerable();


            //courseSalesMasterVm.courseSalesMaster = courseSalesMaster;
            //return View("CourseSalesMaster", courseSalesMasterVm);
        }
Esempio n. 2
0
        public ViewResult CourseSalesMaster(int Id)
        {
            CourseSalesMaster courseSalesMaster = null;
            var courseSalesMasterVm             = new CourseSalesMasterVm
            {
                eduProductList    = new EduProductBO().GetList().AsEnumerable(),
                branchList        = new BranchBO().GetList().AsEnumerable(),
                monthList         = GetMonthData(),
                courseSalesMaster = courseSalesMaster
            };

            if (Id == -1)
            {
                courseSalesMaster = new CourseSalesMaster
                {
                    Id = Id
                         //StartDate = UTILITY.SINGAPORETIME,
                         //EndDate = UTILITY.SINGAPORETIME,
                         //RegClosingDate = UTILITY.SINGAPORETIME.AddDays(-14)
                };
            }
            else
            {
                courseSalesMaster = new CourseSalesMasterBO()
                                    .GetCourseSalesMaster(new CourseSalesMaster {
                    Id = Id
                });

                courseSalesMasterVm.courseList = new CourseBO()
                                                 .GetCoursesByProduct(courseSalesMaster.Product)
                                                 .AsEnumerable();
            }

            courseSalesMasterVm.courseSalesMaster = courseSalesMaster;
            return(View("CourseSalesMaster", courseSalesMasterVm));
        }
Esempio n. 3
0
 public CourseSalesMaster GetCourseSalesMaster(CourseSalesMaster item)
 {
     return((CourseSalesMaster)courseSalesMasterDAL.GetItem <CourseSalesMaster>(item));
 }
Esempio n. 4
0
 public bool ConfirmCoureSalesMaster(CourseSalesMaster item)
 {
     return(courseSalesMasterDAL.Confirm(item));
 }
Esempio n. 5
0
 public bool DeleteCourseSalesMaster(CourseSalesMaster item)
 {
     return(courseSalesMasterDAL.Delete(item));
 }
Esempio n. 6
0
 public Int32 SaveCourseSalesMaster(CourseSalesMaster newItem)
 {
     return(courseSalesMasterDAL.Save(newItem));
 }