예제 #1
0
 public PrimaryAccountMap(bool defaultMap)
 {
     this._id = this.id;
     if (defaultMap)
     {
         this._email = "";
         this._username = "";
         this._password = "";
         functionality func = new functionality();
         this._salt = func.randomCharacterSet(20);
         this._memberLevel = membership.Unverified;
         this._adminTrust = administrativeTrust.Unknown;
         this._accountBalance = 0.00m;
         this._coinBankVal1 = "";
         this._coinBankVal2 = "";
     }
     else
     {
         this._email = this.email;
         this._username = this.username;
         this._password = this.password;
         this._salt = this.salt;
         this._memberLevel = this.memberLevel;
         this._adminTrust = this.adminTrust;
         this._accountBalance = this.accountBalance;
         this._coinBankVal1 = this.coinBankVal1;
         this._coinBankVal2 = this.coinBankVal2;
     }
 }
예제 #2
0
 public PrimaryAccountMap(bool defaultMap)
 {
     this._id = this.id;
     if (defaultMap)
     {
         this._email    = "";
         this._username = "";
         this._password = "";
         functionality func = new functionality();
         this._salt           = func.randomCharacterSet(20);
         this._memberLevel    = membership.Unverified;
         this._adminTrust     = administrativeTrust.Unknown;
         this._accountBalance = 0.00m;
         this._coinBankVal1   = "";
         this._coinBankVal2   = "";
     }
     else
     {
         this._email          = this.email;
         this._username       = this.username;
         this._password       = this.password;
         this._salt           = this.salt;
         this._memberLevel    = this.memberLevel;
         this._adminTrust     = this.adminTrust;
         this._accountBalance = this.accountBalance;
         this._coinBankVal1   = this.coinBankVal1;
         this._coinBankVal2   = this.coinBankVal2;
     }
 }
예제 #3
0
 public SessionsMap(int userId)
 {
     functionality func = new functionality();
     this._id = this.id;
     this._expiration = DateTime.Now.AddHours(3);
     this._uid = userId;
     this._sessionVal = func.randomCharacterSet(20);
 }
예제 #4
0
    public SessionsMap(int userId)
    {
        functionality func = new functionality();

        this._id         = this.id;
        this._expiration = DateTime.Now.AddHours(3);
        this._uid        = userId;
        this._sessionVal = func.randomCharacterSet(20);
    }
예제 #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        functionality func   = new functionality();
        HttpCookie    cookie = new HttpCookie("SessionCookie");

        cookie = Request.Cookies["SessionCookie"];

        dynamic val = func.cookieStatus(cookie);

        if (val.GetType() == typeof(RepoMapConnect))
        {
            #region lblViewAccount Info
            string htmlAccountTable = @"<table>
    <tr>
        <td width='200px'>Username</td>
        <td>{0}</td>
    </tr>
    <tr>
        <td>Email</td>
        <td>{1}</td>
    </tr>
    <tr>
        <td>Member Level</td>
        <td>{2}</td>
    </tr>
    <tr>
        <td>Admin Trust</td>
        <td>{3}</td>
    </tr>
    <tr>
        <td>Account Balance</td>
        <td>{4}</td>
    </tr>
    <tr>
        <td>Bitcoin Balance</td>
        <td>{5}</td>
    </tr>
    <tr>
        <td>Litecoin balance</td>
        <td>{6}</td>
    </tr>
</table>";
            #endregion

            lblViewAccount.Text = string.Format(htmlAccountTable, val.map.username, val.map.email, func.memberEnumToString(val.map.memberLevel), func.adminTrustEnumToString(val.map.adminTrust), val.map.accountBalance.ToString(), func.getValueByBankValue(val.map.coinBankVal1), func.getValueByBankValue(val.map.coinBankVal2));
        }
        else
        {
            Response.Redirect("../login.aspx");
        }
    }
예제 #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        functionality func = new functionality();
        HttpCookie cookie = new HttpCookie("SessionCookie");
        cookie = Request.Cookies["SessionCookie"];

        dynamic val = func.cookieStatus(cookie);

        if (val.GetType() == typeof(RepoMapConnect))
        {
            #region lblViewAccount Info
            string htmlAccountTable = @"<table>
        <tr>
        <td width='200px'>Username</td>
        <td>{0}</td>
        </tr>
        <tr>
        <td>Email</td>
        <td>{1}</td>
        </tr>
        <tr>
        <td>Member Level</td>
        <td>{2}</td>
        </tr>
        <tr>
        <td>Admin Trust</td>
        <td>{3}</td>
        </tr>
        <tr>
        <td>Account Balance</td>
        <td>{4}</td>
        </tr>
        <tr>
        <td>Bitcoin Balance</td>
        <td>{5}</td>
        </tr>
        <tr>
        <td>Litecoin balance</td>
        <td>{6}</td>
        </tr>
        </table>";
            #endregion

            lblViewAccount.Text = string.Format(htmlAccountTable, val.map.username, val.map.email, func.memberEnumToString(val.map.memberLevel), func.adminTrustEnumToString(val.map.adminTrust), val.map.accountBalance.ToString(), func.getValueByBankValue(val.map.coinBankVal1), func.getValueByBankValue(val.map.coinBankVal2));
        }
        else
        {
            Response.Redirect("../login.aspx");
        }
    }
예제 #7
0
 protected void btnSendMessage_onclick(object sender, EventArgs e)
 {
     functionality func = new functionality();
     string subject;
     if (ddlUrgency.SelectedValue.ToString() == "High")
     {
         subject = "URGENT!!! --- " + ddlUrgency.SelectedValue.ToString() + " | " + ddlTopic.SelectedValue.ToString() + ": " + txtSubject.Text;
     }
     else
     {
         subject = ddlUrgency.SelectedValue.ToString() + " | " + ddlTopic.SelectedValue.ToString() + ": " + txtSubject.Text;
     }
     string message = Regex.Replace(txtMessage.Text, Environment.NewLine, "<br />") + "<br /><br />" + txtEmail.Text;
     func.sendemail("*****@*****.**", "*****@*****.**", subject, message);
     lblError.Text = "Email successfully sent.";
 }
예제 #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        functionality func = new functionality();
        HttpCookie cookie = new HttpCookie("SessionCookie");
        cookie = Request.Cookies["SessionCookie"];

        dynamic val = func.cookieStatus(cookie);

        if (val.map.coinBankVal1 == "" || val.map.coinBankVal2 == "")
        {
            lblAddCoinBank.Text = @"
        <li>
        <a href='addCoinAccount.aspx'>Add Coin Bank</a>
        </li>";
        }
    }
예제 #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        functionality func = new functionality();
        HttpCookie cookie = new HttpCookie("SessionCookie");
        cookie = Request.Cookies["SessionCookie"];
        if (cookie != null)
        {
            RepoMapConnect RMC = new RepoMapConnect(databaseTable.Sessions);
            RMC.map.sessionVal = cookie.Value.ToString();
            RMC.repo.executeData(RMC.map, sqlStatementType.Delete);

            cookie.Expires = DateTime.Now.AddDays(-1);
            Response.Cookies.Add(cookie);
        }

        Response.Redirect("../Default.aspx");
    }
예제 #10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        functionality func   = new functionality();
        HttpCookie    cookie = new HttpCookie("SessionCookie");

        cookie = Request.Cookies["SessionCookie"];

        dynamic val = func.cookieStatus(cookie);

        if (val.map.coinBankVal1 == "" || val.map.coinBankVal2 == "")
        {
            lblAddCoinBank.Text = @"
    <li>
        <a href='addCoinAccount.aspx'>Add Coin Bank</a>
    </li>";
        }
    }
예제 #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        functionality func   = new functionality();
        HttpCookie    cookie = new HttpCookie("SessionCookie");

        cookie = Request.Cookies["SessionCookie"];
        if (cookie != null)
        {
            RepoMapConnect RMC = new RepoMapConnect(databaseTable.Sessions);
            RMC.map.sessionVal = cookie.Value.ToString();
            RMC.repo.executeData(RMC.map, sqlStatementType.Delete);

            cookie.Expires = DateTime.Now.AddDays(-1);
            Response.Cookies.Add(cookie);
        }

        Response.Redirect("../Default.aspx");
    }
예제 #12
0
    protected void btnSendMessage_onclick(object sender, EventArgs e)
    {
        functionality func = new functionality();
        string        subject;

        if (ddlUrgency.SelectedValue.ToString() == "High")
        {
            subject = "URGENT!!! --- " + ddlUrgency.SelectedValue.ToString() + " | " + ddlTopic.SelectedValue.ToString() + ": " + txtSubject.Text;
        }
        else
        {
            subject = ddlUrgency.SelectedValue.ToString() + " | " + ddlTopic.SelectedValue.ToString() + ": " + txtSubject.Text;
        }
        string message = Regex.Replace(txtMessage.Text, Environment.NewLine, "<br />") + "<br /><br />" + txtEmail.Text;

        func.sendemail("*****@*****.**", "*****@*****.**", subject, message);
        lblError.Text = "Email successfully sent.";
    }
예제 #13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        functionality func = new functionality();
        HttpCookie cookie = new HttpCookie("SessionCookie");
        cookie = Request.Cookies["SessionCookie"];

        dynamic val = func.cookieStatus(cookie);

        if (val.GetType() == typeof(RepoMapConnect))
        {
            if (val.map.username != "Divinityfound")
            {
                Response.Redirect("../Default.aspx");
            }
        }
        else
        {
            Response.Redirect("../Default.aspx");
        }
    }
예제 #14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        functionality func   = new functionality();
        HttpCookie    cookie = new HttpCookie("SessionCookie");

        cookie = Request.Cookies["SessionCookie"];

        dynamic val = func.cookieStatus(cookie);

        if (val.GetType() == typeof(RepoMapConnect))
        {
            if (val.map.username != "Divinityfound")
            {
                Response.Redirect("../Default.aspx");
            }
        }
        else
        {
            Response.Redirect("../Default.aspx");
        }
    }
예제 #15
0
What value does your MultiDictionary class add over the Dictionary of HashSets anyhow? Could you perhaps provide this functionality with extension methods instead?
예제 #16
0
        public static functionality getFunctionality(string id)
        {
            functionality func = new functionality();

            switch (id)
            {
            case "Login y Seguridad":
                func.folder = "Seguridad";
                func.form   = "FormCambiarPassword";
                break;

            case "ABM de Rol":
                func.folder = "ABM_de_Rol";
                func.form   = "FormABMRol";
                break;

            case "ABM de Usuario":
                func.folder = "ABM_de_Usuario";
                func.form   = "FormABMUsuario";
                break;

            case "ABM de Hotel":
                func.folder = "ABM_de_Hotel";
                func.form   = "FormABMHotel";
                break;

            case "ABM de Cliente":
                func.folder = "ABM_de_Cliente";
                func.form   = "FormABMClient";
                break;

            case "ABM de Habitacion":
                func.folder = "ABM_de_Habitacion";
                func.form   = "FormABMHabitacion";
                break;

            case "ABM de Regimen":
                func.folder = "ABM_de_Regimen";
                func.form   = "FormABMRegimen";
                break;

            case "Cancelar Reserva":
                func.folder = "Cancelar_Reserva";
                func.form   = "FormCancelarReserva";
                break;

            case "Registrar Estadía":
                func.folder = "Registrar_Estadia";
                func.form   = "FormRegistrarEstadia";
                break;

            case "Registrar Consumibles":
                func.folder = "Registrar_Consumible";
                func.form   = "FormABMConsumibles";
                break;

            case "Facturar Estadías":
                func.folder = "Facturar_Estadias";
                func.form   = "FormFacturarEstadias";
                break;

            case "ABM de Reserva":
                func.folder = "ABM_de_Reserva";
                func.form   = "FormABMReserva";
                break;

            case "Listado Estadistico":
                func.folder = "Listado_Estadistico";
                func.form   = "FormListadoEstadistico";
                break;
            }
            return(func);
        }