示例#1
0
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        string strQuery1     = null;
        string strQuery2     = null;
        string strUserID     = null;
        string strUserTypeID = null;

        string    strDateTime = string.Empty;
        clsEpin   objEpin     = new clsEpin();
        clsWallet objWallet   = new clsWallet();

        strDateTime = objWallet.getCurDateTimeString();

        // if (ctrlGoogleReCaptcha.Validate())
        // {
        strQuery1 = "SELECT count(1) From mlm_login where status = 1 and my_sponsar_id='" + clsOdbc.GetStringForSQL(txtUserID.Text) + "' and password='******'";

        int intCount = clsOdbc.executeScalar_int(strQuery1);


        if (intCount > 0)
        {
            System.Data.DataSet ds = new System.Data.DataSet();

            strQuery2 = "SELECT a.userid,a.UserTypeId From mlm_login a Where a.status = 1 and a.my_sponsar_id='" + clsOdbc.GetStringForSQL(txtUserID.Text) + "' and a.password='******'";

            try
            {
                ds = clsOdbc.getDataSet(strQuery2);

                if (ds.Tables[0].Rows.Count > 0)
                {
                    strUserID     = ds.Tables[0].Rows[0][0].ToString();
                    strUserTypeID = ds.Tables[0].Rows[0][1].ToString();

                    string strIPAddress = Request.ServerVariables["REMOTE_ADDR"];
                    objother.AddLoginHistory(Int32.Parse(strUserID), strIPAddress);


                    if (strUserTypeID == "1")
                    {
                        Session["AdminID"] = strUserID;
                        Response.Redirect("portal/admin/dashboard.aspx");
                    }
                    else if (strUserTypeID == "2")
                    {
                        Session["UserID"] = strUserID;
                        Response.Redirect("portal/member/overview.aspx");
                    }
                }
            }
            catch (Exception ex)
            {
            }
            finally
            {
                ds.Dispose();
            }
        }
        else
        {
            CommonMessages.ShowAlertMessage("Entered username or Password is Wrong!");
        }

        /*  }
         * else
         * {
         *    CommonMessages.ShowAlertMessage("Select Captcha!");
         * }*/
    }
示例#2
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     try
     {
         objOdbc.executeNonQuery("INSERT INTO `mlm_contact_us`(`name`, `subject`, `email`, mobile_number, `message`, `created_on`) VALUES ('" + txtName.Text + "','','" + txtEmail.Text + "','" + txtMobile.Text + "','" + txtMessage.Text + "','" + objWallet.getCurDateTimeString() + "')");
         CommonMessages.ShowAlertMessage_Reload("We will be contact you very soon!", "index.aspx");
     }
     catch (Exception ex)
     {
     }
 }
示例#3
0
    public string PurchaseIKeyByCoinpayment(double dblAmount, int IntUserID, int intEpinTypeID, int intEpinCount, double dblEpinPrice, double dblTotPrice)
    {
        string status_url = "";
        SortedList <string, string> listParam = new SortedList <string, string>();

        //add the elements in sortedlist
        listParam.Add("amount", (dblAmount).ToString());
        listParam.Add("currency1", "USD");
        listParam.Add("currency2", "BTC");
        listParam.Add("address", "37KfikBRm8q9b6efZ5pKbggQeA8pKfvyCc");
        listParam.Add("item_name", "A-Code Purchase");
        listParam.Add("ipn_url", "https://www.mysuccesswork.com/portal/user/success_bitcoin.aspx");

        var ret = new Dictionary <string, object>();

        ret = CallAPI("create_transaction", listParam);

        string error = ret["error"].ToString();

        if (error == "ok")
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            string   objectString           = serializer.Serialize(ret["result"]);
            BlogSite bsObj = new BlogSite()
            {
                amount          = "",
                txn_id          = "",
                address         = "",
                confirms_needed = "",
                status_url      = "",
                qrcode_url      = ""
            };

            string amount = "", txn_id = "", address = "", confirms_needed = "", qrcode_url = "";
            var    json = new JavaScriptSerializer().Serialize(ret["result"]);
            using (var ms = new MemoryStream(Encoding.Unicode.GetBytes(json)))
            {
                // Deserialization from JSON
                DataContractJsonSerializer deserializer = new DataContractJsonSerializer(typeof(BlogSite));
                BlogSite bsObj2 = (BlogSite)deserializer.ReadObject(ms);
                amount          = bsObj2.amount;
                txn_id          = bsObj2.txn_id;
                address         = bsObj2.address;
                confirms_needed = bsObj2.confirms_needed;
                status_url      = bsObj2.status_url;
                qrcode_url      = bsObj2.qrcode_url;
            }

            clsWallet objwallet = new clsWallet();
            ODBC      clsOdbc   = new ODBC();

            clsOdbc.executeNonQuery("INSERT INTO `mlm_temp_invest_bitcoin`(`userid`, `amount`, `invest_by`, `error`, `btc_amount`, `txn_id`, `address`, `confirms_needed`, `status_url`, `qrcode_url`, `created_on`, epin_type_id, epin_cost, epin_count, total_cost) VALUES (" + IntUserID + ", " + dblAmount + ", " + IntUserID + ", '" + error + "','" + amount + "','" + txn_id + "','" + address + "','" + confirms_needed + "','" + status_url + "','" + qrcode_url + "','" + objwallet.getCurDateTimeString() + "', " + intEpinTypeID + ", " + dblEpinPrice + "," + intEpinCount + ", " + dblTotPrice + "  ) ");
        }

        CommonMessages.ShowAlertMessage(error.ToString());
        return(status_url);
    }
示例#4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            string   strdt   = objwallet.getCurDateString();
            DateTime dt      = DateTime.Parse(strdt);
            int      intDate = dt.Day;

            if (dt.DayOfWeek != DayOfWeek.Saturday)
            {
                if (dt.DayOfWeek != DayOfWeek.Sunday)
                {
                    int intCount = obj.executeScalar_int("SELECT COUNT(1) FROM mlm_holidays WHERE holiday_date = '" + strdt + "' AND status=1");
                    if (intCount == 0)
                    {
                        //	CommonMessages.ShowAlertMessage(strdt);
                        obj.executeNonQuery("CALL update_profit_share()");
                        obj.executeNonQuery("INSERT INTO `mlm_schedulers`(`schedule_task`, `created_on`) VALUES ('Profit Share','" + objwallet.getCurDateTimeString() + "')");
                    }
                }
            }
            else
            {
                //		CommonMessages.ShowAlertMessage_Reload("Message", "overview.aspx");
            }
        }
        catch (Exception ex)
        {
        }
    }