private void PopulateModal(int ApplicantID) { EventsDAL ApplicantModal = new EventsDAL(); DataTable dt = ApplicantModal.GetSpecificApplicantsData(ApplicantID); foreach (DataRow dtRow in dt.Rows) { lbVRegistrationID.Text = HttpUtility.HtmlEncode(dtRow["RegistrationID"].ToString()); //lbVRegistrationID.Text = dtRow["RegistrationID"].ToString(); lbVRegistrationDate.Text = HttpUtility.HtmlEncode(dtRow["RegistrationDate"].ToString()); lbVEventTitle.Text = HttpUtility.HtmlEncode(dtRow["Title"].ToString()); lbVname.Text = HttpUtility.HtmlEncode(dtRow["Name"].ToString()); lbVnationality.Text = HttpUtility.HtmlEncode(dtRow["Nationality"].ToString()); lbVnric.Text = HttpUtility.HtmlEncode(dtRow["NRIC"].ToString()); //lbVdob.Text = dtRow["DateOfBirth"].ToString(); DateTime DOB = DateTime.Parse(dtRow["DateOfBirth"].ToString()); lbVdob.Text = DOB.ToString("dd MMMM yyyy"); lbVhighestedu.Text = HttpUtility.HtmlEncode(dtRow["HighestEducation"].ToString()); lbVcurrentemploy.Text = HttpUtility.HtmlEncode(dtRow["CurrentEmployment"].ToString()); lbVreferralsource.Text = HttpUtility.HtmlEncode(dtRow["ReferralSource"].ToString()); lbVsignupreason.Text = HttpUtility.HtmlEncode(dtRow["SignupReason"].ToString()); lbVhandphone.Text = HttpUtility.HtmlEncode(dtRow["Handphone"].ToString()); lbVemail.Text = HttpUtility.HtmlEncode(dtRow["Email"].ToString()); } }
private void bindinfofield() { EventsDAL geteventinfo = new EventsDAL(); //DataTable dt = geteventinfo.GetSpecificEventData(EventID); //foreach (DataRow row in dt.Rows) //{ // lbltitle.Text = row["EventTitle"].ToString(); // lblstartDT.Text = row["EventStart"].ToString(); // lblEndDT.Text = row["EventEnd"].ToString(); // int regstatus = int.Parse(row["RegistrationStatus"].ToString()); // if (regstatus == 1) // { // lblregStatus.Text = "Active"; // } // else // { // lblregStatus.Text = "Inactive"; // } // lblregEnd.Text = row["RegistrationEnd"].ToString(); // // lblCreatedBy.Text = row["username"].ToString(); // lblCreatedOn.Text = row["CreateDate"].ToString(); // lblLastModifiedDate.Text = row["LastModifiedDate"].ToString(); //} int countvalue = geteventinfo.GetApplicantsCount(EventID); lblTotalNumberOfApplicants.Text = countvalue.ToString(); }
// Token: 0x060007B1 RID: 1969 RVA: 0x00037204 File Offset: 0x00035404 public Dictionary <int, string> GetNetworkDeviceNamesForPage(CorePageType pageType, List <int> limitationIDs, bool includeBasic) { switch (pageType) { case 1: return(AlertDAL.GetNodeData(limitationIDs, includeBasic)); case 2: { INetworkDeviceDal networkDeviceDal = this.syslogDal; return(((networkDeviceDal != null) ? networkDeviceDal.GetNodeData(limitationIDs) : null) ?? new Dictionary <int, string>(0)); } case 3: { INetworkDeviceDal networkDeviceDal2 = this.trapDal; return(((networkDeviceDal2 != null) ? networkDeviceDal2.GetNodeData(limitationIDs) : null) ?? new Dictionary <int, string>(0)); } case 4: return(EventsDAL.GetNodeData(limitationIDs)); default: throw new NotImplementedException("Unsupported page type"); } }
// For unit testing purposes internal EventsController(EventsDAL eventsDal, UserDAL userDal) { this.eventsDal = eventsDal; this.userDal = userDal; this.SetupJsonFormatter(); }
public EventsController() { this.eventsDal = new EventsDAL(); this.userDal = new UserDAL(); this.SetupJsonFormatter(); }
// For unit testing purposes internal LockController(LockDAL lockDal, EventsDAL eventsDal, UserDAL userDal) { this.lockDal = lockDal; this.eventsDal = eventsDal; this.userDal = userDal; this.SetupJsonFormatter(); }
public void TestInitialize() { var mockLockDal = new LockDAL(mockLockData); var mockEventsDal = new EventsDAL(mockEventsData); var mockUserDal = new UserDAL(new MockUserData()); lockController = new LockController(mockLockDal, mockEventsDal, mockUserDal); }
private void bindtabledata() { EventsDAL DAL = new EventsDAL(); //Populating a DataTable from database. DataTable dt = DAL.GetApplicantsData(); EventRPT.DataSource = dt; EventRPT.DataBind(); }
public DateController(DateDbContext Context, IConfiguration configuration) { _context = Context; ed = new EventsDAL(configuration); md = new MoviesDAL(configuration); zd = new ZipCodeDAL(configuration); pd = new PlacesDAL(configuration); wd = new WeatherDAL(configuration); }
public ActionResult GetEventList() { try { EventsDAL obj = new EventsDAL(); return(Json(new { result = "success", list = obj.GetEventsList(), JsonRequestBehavior.AllowGet })); } catch (Exception ex) { WriteLogs.Write(ex); return(Json(new { result = "error" }, JsonRequestBehavior.AllowGet)); } }
public ActionResult AddEvent(Event e) { try { EventsDAL obj = new EventsDAL(); int eventId = 0; obj.Add(e, ref eventId); HttpFileCollectionBase files = Request.Files; string path = Server.MapPath("~/images/events/" + eventId); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } for (int i = 0; i < files.Count; i++) { HttpPostedFileBase file = files[i]; var InputFileName = Path.GetFileName(file.FileName); var ServerSavePath = Path.Combine(path + "\\" + InputFileName); //Save file to server folder int count = 1; checkIfFileExists: if (System.IO.File.Exists(ServerSavePath)) { ServerSavePath = Path.Combine(path + "\\" + InputFileName.Substring(0, InputFileName.LastIndexOf('.')) + count++ + InputFileName.Substring(InputFileName.IndexOf('.'))); goto checkIfFileExists; } else { file.SaveAs(ServerSavePath); } } return(Json(new { result = "success", images = GetEventPhotos(eventId), eventId = eventId }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { WriteLogs.Write(ex); return(Json(new { result = "error" }, JsonRequestBehavior.AllowGet)); } }
public void ListEvents() { EventsDAL dal = new EventsDAL(); //lvEvent.ItemsSource = dal.GetAllEvents(); }