public ActionResult sendemail(CommunicationModel emails)
        {
            Nahda_AttendanceEntities db    = new Nahda_AttendanceEntities();
            CommunicationGroupMaster mster = new CommunicationGroupMaster();

            mster.Title     = emails.Title;
            mster.Remarks   = emails.Remarks;
            mster.CreatedBy = "Naveed";
            mster.CreatedOn = DateTime.Now;
            mster.School    = Convert.ToInt32(emails.SchlsId);
            List <CommunicationGroupDetail> list = new List <CommunicationGroupDetail>();

            foreach (var i in emails.selecteditems)
            {
                string[] split = i.Split('/');
                CommunicationGroupDetail obj = new CommunicationGroupDetail();
                obj.CreatedBy = "Naveed";
                obj.CreatedOn = DateTime.Now;
                obj.Email     = split[1];
                obj.StaffId   = Convert.ToInt32(split[0]);
                list.Add(obj);
            }
            mster.CommunicationGroupDetails = list;
            db.CommunicationGroupMasters.Add(mster);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public CommunicationController()
 {
     unitOfWork = new UnitOfWork();
     service    = new LessonPlanService();
     mapping    = new LessonPlanMapping();
     model      = new LessonPlanModel();
     dmapping   = new DigitalResourcesMapping();
     db         = new Nahda_AttendanceEntities();
 }
示例#3
0
 public EmailControllerController()
 {
     db = new Nahda_AttendanceEntities();
 }
示例#4
0
 public NewStaffController()
 {
     db         = new Nahda_AttendanceEntities();
     unitofwork = new UnitOfWork();
 }
 public MaintenanceRequestFormController()
 {
     db         = new Nahda_AttendanceEntities();
     unitofwork = new UnitOfWork();
 }
示例#6
0
 public CleaningStaffLocationController()
 {
     db         = new Nahda_AttendanceEntities();
     unitofwork = new UnitOfWork();
 }
 public StudentFeedBackReportController()
 {
     db         = new Nahda_AttendanceEntities();
     unitofwork = new UnitOfWork();
 }
 public WeeklyMeetingScheduleController()
 {
     db         = new Nahda_AttendanceEntities();
     unitofwork = new UnitOfWork();
 }
示例#9
0
 public GenericRepository(Nahda_AttendanceEntities context)
 {
     this.context = context;
     this.dbSet   = context.Set <TEntity>();
 }
 public LeaveRequestFormController()
 {
     unitOfWork = new UnitOfWork();
     db         = new Nahda_AttendanceEntities();
 }
 public ComplaintLogController()
 {
     db         = new Nahda_AttendanceEntities();
     unitofwork = new UnitOfWork();
 }
示例#12
0
 public TestController()
 {
     db = new Nahda_AttendanceEntities();
 }
示例#13
0
 public UnitOfWork()
 {
     _context = new Nahda_AttendanceEntities();
 }