Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if ((Session["pwalletID"] != null) && (Session["pwalletID"].ToString() != ""))
            { this.adminID = Session["pwalletID"].ToString(); }
            else
            { base.Response.Redirect("./login.aspx"); }

                xpwallet = ret.getPwalletByID(adminID);
                if (xpwallet.xmembertype == "rc")
                {
                    name = ret.getMemberByID(xpwallet.xmemberID).xname; addressID = ret.getMemberByID(xpwallet.xmemberID).addressID;
                }
                else if (xpwallet.xmembertype == "rb")
                {
                    name = ret.getBankerByID(xpwallet.xmemberID).xname; addressID = ret.getBankerByID(xpwallet.xmemberID).addressID;
                }
                else if (xpwallet.xmembertype == "ra")
                {
                    name = ret.getAgentByID(xpwallet.xmemberID).xname; addressID = ret.getAgentByID(xpwallet.xmemberID).addressID;
                }
                xname.Text = name.ToUpper();
                if (!IsPostBack)
                {
                    this.ViewState["PreviousPage"] = base.Request.UrlReferrer;
                    xemail.Text = xpwallet.xemail;
                    xtelephone.Text = xpwallet.xmobile;
                    xpass.Text = xpwallet.xpass;
                }
        }
Beispiel #2
0
        public string a_xadminz(string uname, string xpass, string serverpath)
        {
            List<XObjs.Pwallet> lt_adz = new List<XObjs.Pwallet>();
            string file_string = "Xavier";

            string keydir = serverpath + "\\Handlers\\bf.kez";
            if (File.Exists(keydir))
            {
                StreamReader streamReader = new StreamReader(keydir, true);
                file_string = streamReader.ReadToEnd();
                streamReader.Close();
                if (file_string != null)
                {
                    string bitStrengthString = file_string.Substring(0, file_string.IndexOf("</BitStrength>") + 14);
                    file_string = file_string.Replace(bitStrengthString, "");
                }
            }
            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
            string connectionString = this.ConnectXpay();
            string xID = "";
            SqlConnection connection = new SqlConnection(this.ConnectXpay());
            SqlCommand command = new SqlCommand("select xid,xemail,xpass from pwallet ", connection);
            connection.Open();
            SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
            while (reader.Read())
            {
                XObjs.Pwallet ad = new XObjs.Pwallet();
                ad.xid = reader["xID"].ToString();
                ad.xemail = reader["xemail"].ToString();
                ad.xpass = reader["xpass"].ToString();
                lt_adz.Add(ad);
            }
            reader.Close();
            string dpass = ""; string dmail = "";
            for (int i = 0; i < lt_adz.Count; i++)
            {
               // dmail = ody.DecryptString(lt_adz[i].xemail, file_len, file_string);
                //dpass = ody.DecryptString(lt_adz[i].xpass, file_len, file_string);
                if ((uname == lt_adz[i].xemail) && (xpass == lt_adz[i].xpass))
                {
                    xID = lt_adz[i].xid.ToString();
                }
            }
            return xID;
        }
Beispiel #3
0
 public XObjs.Pwallet getPwalletByMobile(string xmobile)
 {
     XObjs.Pwallet x = new XObjs.Pwallet();
     SqlConnection connection = new SqlConnection(this.ConnectXpay());
     SqlCommand command = new SqlCommand("SELECT * FROM pwallet WHERE xmobile='" + xmobile + "' ", connection);
     connection.Open();
     SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
     while (reader.Read())
     {
         x.xid = reader["xid"].ToString();
         x.xmembertype = reader["xmembertype"].ToString();
         x.xmemberID = reader["xmemberID"].ToString();
         x.xemail = reader["xemail"].ToString();
         x.xmobile = reader["xmobile"].ToString();
         x.xpass = reader["xpass"].ToString();
         x.reg_date = reader["reg_date"].ToString();
     }
     reader.Close();
     return x;
 }