Ejemplo n.º 1
0
        //public string ScreenName {
        //    get {
        //        return string.Format(
        //            "{0} <{1}>",
        //            NickName,
        //            UserName
        //            );
        //    }
        //}

        protected override string[] GetSerializeFields()
        {
            return(new string[] {
                UserID.ToString(),
                UserName,
                Email,
                IsAdmin.ToString()
            });
        }
Ejemplo n.º 2
0
        public override string ToString()
        {
            StringBuilder b = new StringBuilder();

            b.AppendLine(Name);
            b.AppendLine(Password);
            b.AppendLine(CountryID.ToString());
            b.AppendLine(IsAdmin.ToString());
            b.AppendLine(ClientID.ToString());
            return(b.ToString());
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Creates an XML element containing the data for the invite
        /// </summary>
        /// <param name="document">XML document the element will be added to</param>
        /// <returns>XML element containing the data for the invite</returns>
        public XmlElement ToXml(XmlDocument document)
        {
            XmlElement invite = document.CreateElement("INVITE");

            XmlAttribute id = document.CreateAttribute("Id");

            id.Value = Id.ToString();
            invite.Attributes.Append(id);

            XmlAttribute emailAddress = document.CreateAttribute("EmailAddress");

            emailAddress.Value = EmailAddress;
            invite.Attributes.Append(emailAddress);

            XmlAttribute isAdmin = document.CreateAttribute("IsAdmin");

            isAdmin.Value = IsAdmin.ToString();
            invite.Attributes.Append(isAdmin);

            XmlAttribute includesCeremony = document.CreateAttribute("IncludesCeremony");

            includesCeremony.Value = IncludesCeremony.ToString();
            invite.Attributes.Append(includesCeremony);

            XmlAttribute reserveSandholeRoom = document.CreateAttribute("ReserveSandholeRoom");

            reserveSandholeRoom.Value = ReserveSandholeRoom.ToString();
            invite.Attributes.Append(reserveSandholeRoom);

            XmlAttribute emailMessages = document.CreateAttribute("EmailMessages");

            emailMessages.Value = EmailMessages.ToString();
            invite.Attributes.Append(emailMessages);

            XmlAttribute notifyGiftWebsite = document.CreateAttribute("NotifyGiftWebsite");

            notifyGiftWebsite.Value = NotifyGiftWebsite.ToString();
            invite.Attributes.Append(notifyGiftWebsite);

            XmlElement guests = document.CreateElement("GUESTS");

            invite.AppendChild(guests);

            foreach (Guest guest in Guests)
            {
                guests.AppendChild(guest.ToXml(document));
            }

            return(invite);
        }
Ejemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.CheckUserSession();
     this.CheckQueryString();
     if (!Page.IsPostBack)
     {
         this.SelectRecordDiscount();
         if (IsAdmin.ToString() == "True")
         {
             CompanyInformationEditingPage             = "AdminCompanyEdit.aspx";
             this.Session["AdminEditCompanyProfileID"] = ProfileID.ToString();
         }
         else
         {
             CompanyInformationEditingPage = "UserProfile_Edit.aspx";
         }
     }
 }
Ejemplo n.º 5
0
    private void CheckUserSession()
    {
        if (this.Session["CORP_PROFILE_CODE"] != null && this.Session["CORP_COUNTRY_CODE"] != null)
        {
            intCountryID = Convert.ToInt32(this.Session["CORP_COUNTRY_CODE"].ToString());
            IsAdmin      = Convert.ToBoolean(this.Session["ISADMIN"]);

            if (IsAdmin.ToString() == "True")
            {
                ProfileID = Convert.ToInt32(this.Session["AdminCompanyProfileID"].ToString());
            }
            else
            {
                ProfileID = Convert.ToInt32(this.Session["CORP_PROFILE_CODE"].ToString());
            }
        }
        else
        {
            Response.Redirect("Default.aspx");
        }
    }
Ejemplo n.º 6
0
 public override string ToString()
 {
     return(string.Join("|", new string[] { Name, Avatar, Icon, Badges, IsAdmin.ToString(), Clan, Faction, Country }));
 }
Ejemplo n.º 7
0
 // format for file
 public string FormatForFile()
 {
     return($"{IDUser}{DELIMITER}{FirstName}{DELIMITER}{LastName}{DELIMITER}{Password}{DELIMITER}{IsAdmin.ToString()}{DELIMITER}{Telephone}{DELIMITER}{City.ToString()}{DELIMITER}");
 }