public EditDisciplinaryTypeVM(string id, string disciplinaryname, string userid)
 {
     UpdateDisciplinaryTypes.id     = id;
     UpdateDisciplinaryTypes.name   = disciplinaryname;
     UpdateDisciplinaryTypes.userId = userid;
     web = new MasterServices((IEditDisciplinary)this);
 }
        public JsonModel AddUpdateMasterService(MasterServicesDTO masterServices, TokenModel token)
        {
            JsonModel Result = new JsonModel()
            {
                data       = false,
                Message    = StatusMessage.Success,
                StatusCode = (int)HttpStatusCodes.OK
            };
            MasterServices masterServiceEntity = null;
            DateTime       CurrentDate         = DateTime.UtcNow;

            if (masterServices.Id == 0 || masterServices.Id == null)
            {
                masterServiceEntity = _mapper.Map <MasterServices>(masterServices);
                masterServiceEntity.OrganizationId = 2; // token.OrganizationID;
                masterServiceEntity.CreatedBy      = 2; // token.UserID;
                masterServiceEntity.CreatedDate    = CurrentDate;
                masterServiceEntity.IsActive       = true;
                imasterServicesRepository.Create(masterServiceEntity);
                imasterServicesRepository.SaveChanges();
            }

            else
            {
                MasterServices masterService = imasterServicesRepository.Get(l => l.Id == masterServices.Id && l.OrganizationId == 2); // token.OrganizationID);
                masterService.UpdatedBy   = 2;                                                                                         // token.UserID;
                masterService.UpdatedDate = CurrentDate;
                masterService.ServiceName = masterServices.ServiceName;
                imasterServicesRepository.Update(masterService);
                imasterServicesRepository.SaveChanges();
            }

            return(Result);
        }
Example #3
0
 public EditHostelVM(string hostelid, string hostelname, string areaid, string zipcode, string address, string phone, string email, string genderhostel)
 {
     //IsCheck1 = true;
     HostelModel.id              = hostelid;
     HostelModel.hostelName      = hostelname;
     HostelModel.areaId          = areaid;
     HostelModel.zipCode         = zipcode;
     HostelModel.addressLine1    = address;
     HostelModel.phoneNo         = phone;
     HostelModel.email           = email;
     HostelModel.hostelForGender = genderhostel;
     if (HostelModel.hostelForGender == "Female")
     {
         IsCheck2 = true;
     }
     else
     {
         IsCheck1 = true;
     }
     updateHostel  = new UpdateHostel();
     AreaIds       = areaid;
     Check1Clicked = new Command(check1Clicked);
     Check2Clicked = new Command(check2Clicked);
     web           = new MasterServices((MasterI)this, (EditHostelI)this);
     web.GetAllArea();
 }
Example #4
0
 public WardenAssignmentVM()
 {
     web     = new MasterServices((MasterI)this, (IWardenAssignment)this);
     student = new StudentService(this);
     web.GetAllArea();
     student.GetAllWarden();
 }
Example #5
0
 public EditFacilityVM(string id, string facility, string userid)
 {
     UpdateFacility.id     = id;
     UpdateFacility.name   = facility;
     UpdateFacility.userId = userid;
     web = new MasterServices((EditFasilityI)this);
 }
 public EditServiceCategoryVM(string id, string name, string userid)
 {
     UpdateServiceCategoryModel.id     = id;
     UpdateServiceCategoryModel.name   = name;
     UpdateServiceCategoryModel.userId = userid;
     web = new MasterServices((IEditservicecategory)this);
 }
Example #7
0
 public IActionResult Edit(MasterServices masterServices)
 {
     try
     {
         ViewBag.EditServiseName = _crudService.GetAll().Select(x => x.NameOfService).ToList();
         //masterServices.Master = _masterCrudService.Get(masterServices.MasterId);
         var service = _crudService.GetAll().First(x => x.NameOfService == masterServices.Service.NameOfService);
         masterServices.Service = service;
         if (_masterServiceCrudService.Get(masterServices.MasterId, masterServices.Service.Id) == null)
         {
             var deletedService = _masterServiceCrudService.Delete(masterServices.MasterId, masterServices.ServiceId);
             masterServices.ServiceId = service.Id;
             var updatedMasterService = _masterServiceCrudService.UpdateNew(masterServices);
         }
         else
         {
             if (masterServices.Service.Id != masterServices.ServiceId)
             {
                 masterServices.ServiceId = masterServices.Service.Id;
             }
             _masterServiceCrudService.Update(masterServices);
         }
     }
     catch (ServiceOperationException exception)
     {
         ViewBag.Error = ErrorFactory.IdentifyExceptionByType(exception).Description;
         return(View(masterServices));
     }
     return(RedirectToAction("Get", new { masterId = masterServices.MasterId }));
 }
Example #8
0
 public RoomVM()
 {
     web          = new MasterServices(this, this);
     RoomProperty = new Properties();
     web.GetAllRomType1();
     web.GetAllArea();
 }
 public DisciplinaryActionVM()
 {
     warden  = new WardenService((IDisciplinaryAction)this);
     web     = new MasterServices((ViewIDisciplinary)this);
     student = new StudentService((ViewHostelAdmittedStudent)this);
     web.ViewDisciplinaryType();
     student.GetHostelStudent();
 }
Example #10
0
 public WardenCreationVM()
 {
     web = new MasterServices(this);
     web.GetAllRole();
     IsCheck1      = true;
     Check1Clicked = new Command(check1Clicked);
     Check2Clicked = new Command(check2Clicked);
 }
Example #11
0
 public RoomBedVM()
 {
     AreaVisible   = false;
     HostelVisible = false;
     web           = new MasterServices((MasterI)this, (RoomBedI)this, (RoomListI)this);
     web.GetAllArea1();
     // web.GetAllRomTypeForRoomBed();
 }
Example #12
0
 public EditRoomBedVM(string roomname, string bedId, string bedNo, string hostelRoomId, string hostelId)
 {
     RommName                   = roomname;
     updateRoomBed.bedId        = bedId;
     updateRoomBed.bedNo        = bedNo;
     updateRoomBed.hostelRoomId = hostelRoomId;
     updateRoomBed.hostelId     = hostelId;
     web = new MasterServices((EditRoomBedI)this);
 }
 public StudentHostelAdmissionVM()
 {
     web     = new StudentService((HostelAdmissionI)this, (Icoursedetail)this, (ProfileI)this);
     masters = new MasterServices((RoomBedI1)this, (MasterI)this, (FloorI)this);
     web.GetProfiile(App.userid);
     masters.GetAllArea();
     masters.GetAllRomType();
     web.GetCourseList();
 }
Example #14
0
 public EditFloorVM(string floorId, string floorName, string hostelId, string noOfRooms, string blocks_id)
 {
     FloorModelData.id        = Convert.ToInt32(floorId);
     FloorModelData.floorNo   = floorName;
     FloorModelData.hostelId  = Convert.ToInt32(hostelId);
     FloorModelData.noOfRooms = Convert.ToInt32(noOfRooms);
     blockid = blocks_id;
     web     = new MasterServices((MasterI)this, (EditFloorI)this);
 }
Example #15
0
 public EditRoomTypeVM(string roomid, string userid, string hostelroomtypename, string hostelid)
 {
     UpdateRoomTypeModel.id                 = roomid;
     UpdateRoomTypeModel.userId             = userid;
     UpdateRoomTypeModel.hostelRoomTypeName = hostelroomtypename;
     //UpdateRoomTypeModel.hostelId = hostelid;
     web = new MasterServices((MasterI)this, (EditRoomTypeI)this);
     web.GetAllArea();
 }
 public GuestRegBeforeLoginVM()
 {
     web           = new MasterServices((MasterI)this, (RoomListI)this);
     guestServices = new GuestServices(this);
     IsCheck1      = true;
     Check1Clicked = new Command(check1Clicked);
     Check2Clicked = new Command(check2Clicked);
     web.GetAllArea();
 }
Example #17
0
 public EditBlockVM(string id, string name, string hostelid, string areaid)
 {
     BlockModel.id   = id;
     BlockModel.name = name;
     BlockName       = name;
     this.hostelid   = hostelid;
     areaId          = areaid;
     web             = new MasterServices((MasterI)this, (EditBlockI)this);
 }
Example #18
0
 public HostelVM()
 {
     AreaVisible   = false;
     IsCheck1      = true;
     Check1Clicked = new Command(check1Clicked);
     Check2Clicked = new Command(check2Clicked);
     web           = new MasterServices((MasterI)this, (HostelI)this);
     // send id into base 64 formate
     web.GetAllArea();
 }
Example #19
0
        public IActionResult Create(Guid masterId)
        {
            var masterIdToCreateMasterService = new MasterServices()
            {
                MasterId = masterId
            };

            ViewBag.Serviсes = new SelectList(_crudService.GetAll(), "Id", "NameOfService");
            return(View(masterIdToCreateMasterService));
        }
Example #20
0
 public BlockVM()
 {
     AreaVisible   = false;
     HostelVisible = false;
     BlockData     = new BlockModel();
     web           = new MasterServices((MasterI)this, this);
     // send id into base 64 formate
     web.GetAllArea();
     //web.GetAllHostel(AreaModelList[0]);
 }
Example #21
0
 public EditNewsFeedVM(string id, string title, string description, string startdates, string lastdates, string linkId)
 {
     UpdateNewsFeeds.id              = id;
     UpdateNewsFeeds.newsTitle       = title;
     UpdateNewsFeeds.newsDescription = description;
     UpdateNewsFeeds.startDate       = startdates;
     UpdateNewsFeeds.lastDate        = lastdates;
     UpdateNewsFeeds.linkId          = linkId;
     web = new MasterServices((IEditnewsfeeddata)this);
 }
Example #22
0
 public AreaVM()
 {
     CountryVisible = false;
     StateVisible   = false;
     AreaVisible    = false;
     CountryList    = new CountryModel();
     web            = new MasterServices((CountryI)this, (AreaI)this);
     // send id into base 64 formate
     web.GetCountryDetails();
 }
Example #23
0
 public EditAreaVM(string areaid, string areaname, string stateid)
 {
     updateAre     = new UpdateAreModel();
     Area.id       = areaid;
     Area.areaName = areaname;
     Area.stateId  = stateid;
     web           = new MasterServices((CountryI)this, (EditAreaI)this);
     web.StateListForEditing(stateid);
     CountryList = new CountryModel();
     web.GetCountryDetails();
 }
Example #24
0
 public EditRoomVM(string id, string name, string hostelid, string hostelroomtypeid, string blockid, string floorid, string noOfBed)
 {
     Id               = id;
     Name             = name;
     Hostelid         = hostelid;
     Hostelroomtypeid = hostelroomtypeid;
     Blockid          = blockid;
     Floorid          = floorid;
     NoOfBed          = noOfBed;
     web              = new MasterServices((EditRoomI)this);
 }
Example #25
0
 public FloorVM()
 {
     FloorProp.AreaVisible   = false;
     FloorProp.HostelVisible = false;
     FloorProp.BlockVisible  = false;
     FloorData = new FloorModel();
     web       = new MasterServices(this, this);
     // send id into base 64 formate
     web.GetAllArea();
     web.GetAllRomType();
 }
        public bool DeleteMasterService(int Id, TokenModel token)
        {
            MasterServices masterService = imasterServicesRepository.Get(l => l.Id == Id && l.OrganizationId == 2);// token.OrganizationID);

            masterService.IsDeleted   = true;
            masterService.IsActive    = false;
            masterService.DeletedBy   = 2;// token.UserID;
            masterService.DeletedDate = DateTime.UtcNow;
            imasterServicesRepository.SaveChanges();

            return(true);
        }
Example #27
0
 public EditDisciplinaryActionVM(string disciplinaryname, string discpid, string wardendiscipid, string description, string hostelAdmissionId, string date, string time)
 {
     DisciplinaryName = disciplinaryname;
     UpdateDisciplinaryActionbywarden.disciplinaryTypeId   = discpid;
     UpdateDisciplinaryActionbywarden.wardenDisciplinaryId = wardendiscipid;
     UpdateDisciplinaryActionbywarden.description          = description;
     UpdateDisciplinaryActionbywarden.hostelAdmissionId    = hostelAdmissionId;
     UpdateDisciplinaryActionbywarden.date = date;
     UpdateDisciplinaryActionbywarden.time = time;
     WardenService = new WardenService((IEditDisciplinary)this);
     web           = new MasterServices((ViewIDisciplinary)this);
     web.ViewDisciplinaryType();
 }
        public NewsFeedViewModel()
        {
            var profiles = Connectivity.ConnectionProfiles;

            if (profiles.Contains(ConnectionProfile.WiFi) || profiles.Contains(ConnectionProfile.Cellular))
            {
                warden = new WardenService(this);
                web    = new MasterServices((IDeletenewsfeeddata)this);
                warden.GetNewsFeedDatalist();
            }
            else
            {
                IsResponsenotok = true;
            }
        }
Example #29
0
        public IActionResult Edit(Guid masterId, Guid serviceId)
        {
            var master = new MasterServices();

            try
            {
                ViewBag.Servises        = _crudService.GetAll().ToList();
                ViewBag.EditServiseName = _crudService.GetAll().Select(x => x.NameOfService).ToList();
                master = _masterServiceCrudService.Get(masterId, serviceId);
                ViewBag.MasterServices = master;
            }
            catch (ServiceOperationException exception)
            {
                ViewBag.Error = ErrorFactory.IdentifyExceptionByType(exception).Description;
            }
            return(View(master));
        }
Example #30
0
        public IActionResult Create(MasterServices masterServices)
        {
            var createdMaster = new List <MasterServices>();

            try
            {
                ViewBag.Serviсes = new SelectList(_crudService.GetAll(), "Id", "NameOfService");
                createdMaster.Add(_masterServiceCrudService.Create(masterServices));
            }
            catch (ServiceOperationException exception)
            {
                ViewBag.Error = ErrorFactory.IdentifyExceptionByType(exception).Description;
                return(View(masterServices));
            }

            return(RedirectToAction("Get", new { masterId = masterServices.MasterId }));
        }