/// <summary> /// Reads an XML Object From An Existing DOM /// </summary> /// <param name="rootnode">Node Containing the root Object element</param> public void ReadXML(XmlNode rootnode) { foreach (XmlNode childnode in rootnode.ChildNodes) { if (string.IsNullOrEmpty(childnode.InnerText)) { continue; } switch (childnode.LocalName) { case "OrganizationInformation": this.organizationInformation = new OrganizationInformation(); this.organizationInformation.ReadXML(childnode); break; case "OrganizationGeoLocation": this.organizationGeoLocation = new GeoOASISWhere(); this.organizationGeoLocation.ReadXML(childnode.ChildNodes[0]); break; case "#comment": break; default: throw new ArgumentException("Unexpected Child Node Name: " + childnode.Name + " in OrganizationType"); } } }
/// <summary> /// Reads this Object's values from an XML node list /// </summary> /// <param name="rootnode">root XML Node of the Object element</param> internal void ReadXML(XmlNode rootnode) { OrganizationInformation infoTemp = new OrganizationInformation(); foreach (XmlNode childnode in rootnode.ChildNodes) { if (string.IsNullOrEmpty(childnode.InnerText)) { continue; } switch (childnode.LocalName) { case "Structure": if (this.structure == null) { this.structure = new List <OrganizationInformation>(); } infoTemp.ReadXML(childnode); this.structure.Add(infoTemp); break; case "StructureGraphic": // this.structureGraphic = Convert.ToByte(childnode.InnerText); break; case "#comment": break; default: throw new ArgumentException("Unexpected Child Node Name: " + childnode.Name + " in IncidentCommandOrganizationandAssignments"); } } }
private void GeneralInformationDashboardControl_Load(object sender, EventArgs e) { Connection = new SqlConnection(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\anik\Documents\anik.mdf;Integrated Security=True;Connect Timeout=30"); organizationInformation = new OrganizationInformation(); OganizationInformationShow(); fillRegionComboBox(); }
public static OrganizationInformation AsInformation(this Organization organization) { var mdl = new OrganizationInformation() { OrganizationId = organization.OrganizationId, OrganizationName = organization.OrganizationName, OrganizationShort = organization.OrganizationShort }; return(mdl); }
public ActionResult Login(string employeeId, string password) { OrganizationInformation organization = new OrganizationInformation(); var msg = _iLoginManager.DoLogin(employeeId, password); if (msg.MessageType == MessageTypes.Success) { CreateSession(employeeId); } else { Session["Session"] = null; } return(Json(msg, JsonRequestBehavior.AllowGet)); }
public BoundSonarQubeProject(Uri serverUri, string projectKey, ICredentials credentials = null, OrganizationInformation organization = null) : this() { if (serverUri == null) { throw new ArgumentNullException(nameof(serverUri)); } if (string.IsNullOrWhiteSpace(projectKey)) { throw new ArgumentNullException(nameof(projectKey)); } this.ServerUri = serverUri; this.Organization = organization; this.ProjectKey = projectKey; this.Credentials = credentials; }
public void InsertGetOrganizationInformationr(OrganizationInformation user) { throw new NotImplementedException(); }
public async Task <ActionResult> Register(RegisterViewModel model) { if (ModelState.IsValid) { var user = new ApplicationUser { UserName = model.Email, Email = model.Email, DateCreated = DateTime.Now, FirstName = model.FirstName, Gender = model.Gender, LastName = model.LastName, PhoneNumber = model.PhoneNumber, ProfilePicture = null, DoB = DateTime.Now, IsActive = true, }; var result = await UserManager.CreateAsync(user, model.Password); if (result.Succeeded) { //new database creation int msecs = DateTime.Now.Millisecond; var dbName = model.OrganizationName.Replace(" ", "") + "_" + msecs.ToString(); if (RegistrationHelpers.CreateNewRegisteredDatabase(dbName)) { db.Users.Attach(user); var org = new OrganizationInformation(); org.Id = Guid.NewGuid(); org.Server = "localhost"; org.Password = ""; org.User = ""; org.OrganizationName = model.OrganizationName; org.Database = dbName; db.OrganizationInformation.Add(org); ApplicationUserOrganizationInformations link = new ApplicationUserOrganizationInformations(); link.ApplicationUser = user; link.OrganizationInformation = org; link.OrganizationId = org.Id; link.ApplicationUserId = user.Id; user.ApplicationUserOrganizationInformations.Add(link); db.SaveChanges(); } await SignInManager.SignInAsync(user, isPersistent : false, rememberBrowser : false); // For more information on how to enable account confirmation and password reset please visit http://go.microsoft.com/fwlink/?LinkID=320771 // Send an email with this link // string code = await UserManager.GenerateEmailConfirmationTokenAsync(user.Id); // var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: Request.Url.Scheme); // await UserManager.SendEmailAsync(user.Id, "Confirm your account", "Please confirm your account by clicking <a href=\"" + callbackUrl + "\">here</a>"); return(RedirectToAction("Index", "Home")); } AddErrors(result); } // If we got this far, something failed, redisplay form return(View(model)); }
/// <summary> /// Reads this Object's values from an XML node list /// </summary> /// <param name="rootnode">root XML Node of the Object element</param> internal void ReadXML(XmlNode rootnode) { foreach (XmlNode childnode in rootnode.ChildNodes) { if (string.IsNullOrEmpty(childnode.InnerText)) { continue; } switch (childnode.LocalName) { case "AgencyOrganization": this.agencyOrganization = new OrganizationInformation(); this.agencyOrganization.ReadXML(childnode.FirstChild); break; case "BranchDivisionGroupLocation": this.branchDivisionGroupLocation = childnode.InnerText; break; case "TypeCategoryKind": this.typeCategoryKind = childnode.InnerText; break; case "OverheadPosition": this.overheadPosition = childnode.InnerText; break; case "SpecialEquipment": this.specialEquipment = childnode.InnerText; break; case "ReportingLocation": this.reportingLocation = new GeoOASISWhere(); this.reportingLocation.ReadXML(childnode.FirstChild); break; case "WorkAssignment": this.workAssignment = childnode.InnerText; break; case "RequestedArrival": this.requestedArrival = Convert.ToDateTime(childnode.InnerText); break; case "ETA": this.eta = Convert.ToDateTime(childnode.InnerText); break; case "IncidentCommandOrganizationandAssignments": this.organizationAndAssignments.ReadXML(childnode); break; case "#comment": break; default: throw new ArgumentException("Unexpected Child Node Name: " + childnode.Name + " in ResponseResourcesDetail"); } } }