Beispiel #1
0
        protected void Button3_Click(object sender, EventArgs e)
        {
            return_ r = new return_();

            if (r.bal_("email", reset_email.Value, 4).Equals("none"))
            {
                Panel1.Visible = true;
                Label2.Text    = "Email Address doesnot exists. ";
                Panel2.Visible = false;
            }
            else
            {
                maill         mai  = new maill();
                string        pass = mai.send_maill("", reset_email.Value, "Your password is ", 2);
                SqlConnection cn   = new SqlConnection();
                cn.ConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["cnstring"].ToString();
                cn.Open();
                string     str12 = "update signup set pass ='******' where  email='" + reset_email.Value + "'  ";
                SqlCommand cmd   = new SqlCommand(str12, cn);
                cmd.ExecuteNonQuery();

                cn.Close();

                Panel2.Visible = true;
                Label3.Text    = "Password has been sent to  " + reset_email.Value;;
                Panel1.Visible = false;
            }
        }
Beispiel #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            return_ ret  = new return_();
            string  name = ret.bal_(Session["unid"].ToString(), "", 5);

            if (name.Equals(TextBox1.Text))
            {
                SqlConnection cn = new SqlConnection();
                cn.ConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["cnstring"].ToString();
                cn.Open();
                string     str12 = "update signup set pass ="******" where  unid='" + Session["unid"].ToString() + "'  ";
                SqlCommand cmd   = new SqlCommand(str12, cn);
                cmd.ExecuteNonQuery();

                cn.Close();

                Panel1.Visible = false;
                Panel2.Visible = true;
            }
            else
            {
                Panel2.Visible = false;
                Panel1.Visible = true;
                Label2.Text    = "Old Password is wrong";
            }
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["unid"] == null)
            {
                Response.Redirect("../Index.aspx");
            }
            else
            {
                return_ name = new return_();
                Label1.Text = name.bal_(Session["unid"].ToString(), "", 2);

                if (!IsPostBack)
                {
                    DropDownList1.Items.Add(new ListItem("Select Operator", ""));

                    SqlConnection cn = new SqlConnection();
                    cn.ConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["cnstring"].ToString();

                    cn.Open();
                    String        str = "select * from comp_reg ";
                    SqlCommand    cmd = new SqlCommand(str, cn);
                    SqlDataReader dr  = cmd.ExecuteReader();
                    while (dr.Read())
                    {
                        DropDownList1.Items.Add(new ListItem(dr[1].ToString().ToUpper(), dr[0].ToString()));
                    }
                    cn.Close();
                }
            }
        }
Beispiel #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["unid"] == null)
     {
         Response.Redirect("../Index.aspx");
     }
     else
     {
         return_ name = new return_();
         Label1.Text = name.bal_(Session["unid"].ToString(), "", 2);
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["id"] == null)
     {
         Response.Redirect("../Index.aspx");
     }
     else
     {
         return_ name = new return_();
         Label1.Text   = name.bal_(Session["id"].ToString(), "companyname", 6);
         Number2.Value = Label1.Text;
     }
 }
Beispiel #6
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Panel1.Visible = false;
            Panel2.Visible = false;
            return_ ret  = new return_();
            string  name = ret.bal_(Acc.Value, "", 2);

            if (name.Equals("none"))
            {
                Panel1.Visible = true;
                Panel2.Visible = false;
                Label2.Text    = "Unique Id doesnot exist ";
            }
            else if (!Text1.Value.Equals(Session["unid"].ToString()))
            {
                Panel1.Visible = true;
                Panel2.Visible = false;
                Label2.Text    = "Please enter your correct unique id ";
            }
            else
            {
                int cash = Int32.Parse(money.Text) - Int32.Parse(AddMoney.Value);
                if (cash > 0)
                {
                    add_money     money1 = new add_money(Acc.Value, Int32.Parse(AddMoney.Value), 0);
                    SqlConnection cn     = new SqlConnection();
                    cn.ConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["cnstring"].ToString();
                    cn.Open();
                    string     str12 = "update signup set wallet =wallet-" + Int32.Parse(AddMoney.Value) + " where  unid='" + Session["unid"].ToString() + "'  ";
                    SqlCommand cmd   = new SqlCommand(str12, cn);
                    cmd.ExecuteNonQuery();

                    cn.Close();
                    transaction  tra  = new transaction(Session["unid"].ToString(), "Transfered Rs " + AddMoney.Value + " to  " + name + " (" + Acc.Value + ")", 2);
                    notification noyi = new notification(Session["unid"].ToString(), Acc.Value, Label1.Text + " (" + Session["unid"].ToString() + ") Transfered Rs " + AddMoney.Value, 1);
                    Panel1.Visible = false;
                    Panel2.Visible = true;
                }
                else
                {
                    Panel1.Visible = true;
                    Panel2.Visible = false;
                    Label2.Text    = "You have insufficient balance";
                }
            }
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            Panel1.Visible = false;
            Panel2.Visible = false;
            return_ ret = new return_();
            string  bal = ret.bal_(Acc.Value, pass.Value, 1);

            if (bal == "none")
            {
                Panel1.Visible = true;
                Panel2.Visible = false;
                Label2.Text    = "Credentials are wrong ";
            }
            else
            {
                int new_bal = Int32.Parse(bal) - Int32.Parse(AddMoney.Value);
                if (new_bal >= 0)
                {
                    add_money     money = new add_money(Session["unid"].ToString(), Int32.Parse(AddMoney.Value), 0);
                    SqlConnection cn    = new SqlConnection();
                    cn.ConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["cnstring"].ToString();
                    cn.Open();
                    string     str12 = "update banker set bal =bal-" + Int32.Parse(AddMoney.Value) + " where  accno='" + Acc.Value + "'  ";
                    SqlCommand cmd   = new SqlCommand(str12, cn);
                    cmd.ExecuteNonQuery();

                    cn.Close();

                    transaction tra = new transaction(Session["unid"].ToString(), "Transfered Rs " + AddMoney.Value + " from account no " + Acc.Value, 1);

                    Panel1.Visible = false;
                    Panel2.Visible = true;
                }
                else
                {
                    Panel1.Visible = true;
                    Panel2.Visible = false;
                    Label2.Text    = "Your bank has insufficient balance";
                }
            }
        }
Beispiel #8
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Panel1.Visible = false;
            Panel2.Visible = false;
            return_ ret = new return_();
            string  bal = ret.bal_(Acc.Value, Text1.Value, 1);

            if (bal == "none")
            {
                Panel1.Visible = true;
                Panel2.Visible = false;
                Label2.Text    = "Credentials are wrong ";
            }
            else
            {
                int cash = Int32.Parse(money.Text) - Int32.Parse(AddMoney.Value);
                if (cash > 0)
                {
                    add_money     money1 = new add_money(Acc.Value, Int32.Parse(AddMoney.Value), 1);
                    SqlConnection cn     = new SqlConnection();
                    cn.ConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["cnstring"].ToString();
                    cn.Open();
                    string     str12 = "update signup set wallet =wallet-" + Int32.Parse(AddMoney.Value) + " where  email='" + Session["email"].ToString() + "'  ";
                    SqlCommand cmd   = new SqlCommand(str12, cn);
                    cmd.ExecuteNonQuery();

                    cn.Close();
                    Panel1.Visible = false;
                    Panel2.Visible = true;
                }
                else
                {
                    Panel1.Visible = true;
                    Panel2.Visible = false;
                    Label2.Text    = "You have insufficient balance";
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["unid"] == null)
            {
                Response.Redirect("../Index.aspx");
            }
            else
            {
                return_ name = new return_();
                Label1.Text = name.bal_(Session["unid"].ToString(), "", 2);
                string status = "";
                string s      = "";
                string mna    = Request.Params["mname"].ToString();
                if (mna == "1")
                {
                    a1.Attributes.Add("class", "btn btn-rw btn-success");

                    s = " SELECT * FROM notification where sid='" + Session["unid"].ToString() + "' and (status='10' or status='11') order by id desc ";
                }
                else if (mna == "2")
                {
                    a2.Attributes.Add("class", "btn btn-rw btn-success");
                    s = " SELECT * FROM notification where sid='" + Session["unid"].ToString() + "' and  status='11' order by id desc ";
                }
                else if (mna == "3")
                {
                    a3.Attributes.Add("class", "btn btn-rw btn-success");
                    s = " SELECT * FROM notification where sid='" + Session["unid"].ToString() + "' and status='10'  order by id desc ";
                }
                SqlConnection cn = new SqlConnection();
                cn.ConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["cnstring"].ToString();
                cn.Open();

                SqlCommand    cmd = new SqlCommand(s, cn);
                SqlDataReader dr  = cmd.ExecuteReader();
                pane.Controls.Add(new LiteralControl("<div class='table-responsive'>"));
                pane.Controls.Add(new LiteralControl("<table  class='table cart-table table-striped'>"));
                pane.Controls.Add(new LiteralControl("<thead>"));
                pane.Controls.Add(new LiteralControl("<tr>"));
                pane.Controls.Add(new LiteralControl("<th>S.No</th>"));

                pane.Controls.Add(new LiteralControl("<th>Message</th>"));
                pane.Controls.Add(new LiteralControl("<th>Date</th>"));
                pane.Controls.Add(new LiteralControl("<th>Status</th>"));


                pane.Controls.Add(new LiteralControl("</tr>"));
                pane.Controls.Add(new LiteralControl("</thead>"));
                pane.Controls.Add(new LiteralControl("<tbody>"));

                int count = 0;
                while (dr.Read())
                {
                    count++;


                    pane.Controls.Add(new LiteralControl("<tr>"));
                    pane.Controls.Add(new LiteralControl("<td>"));
                    pane.Controls.Add(new LiteralControl("<span class='pill medium green'>" + count + "</span>"));
                    pane.Controls.Add(new LiteralControl("</td>"));

                    pane.Controls.Add(new LiteralControl("<td>" + dr[3].ToString()));

                    pane.Controls.Add(new LiteralControl("</td>"));
                    var sp = dr[5].ToString().Split(' ');
                    pane.Controls.Add(new LiteralControl("<td>" + sp[0]));

                    pane.Controls.Add(new LiteralControl("</td>"));

                    if (dr[4].ToString() == "10")
                    {
                        status = "<h4><span class='label label-warning'>Pending</span></h4>";
                    }
                    else if (dr[4].ToString() == "11")
                    {
                        status = "<h4><span class='label label-success'>Dispatched</span></h4>";
                    }

                    pane.Controls.Add(new LiteralControl("<td>" + status));


                    pane.Controls.Add(new LiteralControl("</td>"));


                    pane.Controls.Add(new LiteralControl("</tr>"));
                }
                pane.Controls.Add(new LiteralControl("</tbody></table></div>"));

                cmd.Dispose();
                cn.Close();
                if (count == 0)
                {
                    pane.Controls.Add(new LiteralControl("No Record found"));
                }
            }
        }
Beispiel #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["unid"] == null)
            {
                Response.Redirect("../Index.aspx");
            }
            else
            {
                return_ name = new return_();
                Label1.Text = name.bal_(Session["unid"].ToString(), "", 2);

                int msnme = Int32.Parse(Request.Params["mname"].ToString());
                if (!IsPostBack)
                {
                    DropDownList1.SelectedValue = msnme.ToString();
                }

                SqlConnection cn = new SqlConnection();
                cn.ConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["cnstring"].ToString();
                cn.Open();
                String s = "";
                if (msnme == 0)
                {
                    s = " SELECT * FROM trans where sid='" + Session["unid"].ToString() + "' order by id desc ";
                }
                else if (msnme == 6)
                {
                    s = " SELECT * FROM trans where sid='" + Session["unid"].ToString() + "' and (status='4' or status='5') order by id desc ";
                }
                else
                {
                    s = " SELECT * FROM trans where sid='" + Session["unid"].ToString() + "' and status='" + msnme + "'";
                }



                SqlCommand    cmd = new SqlCommand(s, cn);
                SqlDataReader dr  = cmd.ExecuteReader();


                int count = 0;
                while (dr.Read())
                {
                    count++;
                    //
                    if (dr[4].ToString() == "1")
                    {
                        pane.Controls.Add(new LiteralControl("<div class='alert alert-success alert-success-rw alert-dismissible' role='alert'>"));
                    }
                    else if (dr[4].ToString() == "2")
                    {
                        pane.Controls.Add(new LiteralControl("<div class='alert alert-info alert-info-rw alert-dismissible' role='alert'>"));
                    }
                    else if (dr[4].ToString() == "3")
                    {
                        pane.Controls.Add(new LiteralControl("<div class='alert alert-warning alert-warning-rw alert-dismissible' role='alert'>"));
                    }
                    else if (dr[4].ToString() == "4")
                    {
                        pane.Controls.Add(new LiteralControl("<div class='alert alert-danger alert-danger-rw alert-dismissible' role='alert'>"));
                    }
                    else if (dr[4].ToString() == "5")
                    {
                        pane.Controls.Add(new LiteralControl("<div class='alert alert-clear alert-dismissible' role='alert'>"));
                    }



                    pane.Controls.Add(new LiteralControl("<button type='button' class='close' data-dismiss='alert'><span aria-hidden='true'>&times;</span><span class='sr-only'>Close</span></button>"));
                    var    sp    = dr[3].ToString().Split(' ');
                    string namee = sp.First();
                    string na    = namee;
                    if (dr[4].ToString() == "5")
                    {
                        namee = "<span style='Color:black'>" + na + "</span>";
                    }
                    pane.Controls.Add(new LiteralControl("<h4> <span class='label' >" + namee + "</span></h4>"));
                    pane.Controls.Add(new LiteralControl("<b>" + dr[2].ToString() + "</b></div>"));
                }
                cmd.Dispose();
                cn.Close();
                if (count == 0)
                {
                    pane.Controls.Add(new LiteralControl("<div class='alert alert-info alert-info-rw' role='alert'><b>Look ahead!</b> No Transactions Found.</div>"));
                }
            }
        }
Beispiel #11
0
        public void friendrequest()
        {
            return_ nn     = new return_();
            String  new_my = nn.bal_("unid", Session["unid"].ToString(), 4);

            SqlConnection cn = new SqlConnection();

            cn.ConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["cnstring"].ToString();
            cn.Open();


            String        s   = " SELECT * FROM frndz where  cid=" + new_my + "  and status=0";
            SqlCommand    cmd = new SqlCommand(s, cn);
            SqlDataReader dr  = cmd.ExecuteReader();

            frndrequest.Controls.Add(new LiteralControl("<div class='table-responsive'>"));
            frndrequest.Controls.Add(new LiteralControl("<table  class='table cart-table table-striped'>"));
            frndrequest.Controls.Add(new LiteralControl("<thead>"));
            frndrequest.Controls.Add(new LiteralControl("<tr>"));
            frndrequest.Controls.Add(new LiteralControl("<th>Name</th>"));
            frndrequest.Controls.Add(new LiteralControl("<th>Accept</th>"));

            frndrequest.Controls.Add(new LiteralControl("<th>Reject</th>"));


            frndrequest.Controls.Add(new LiteralControl("</tr>"));
            frndrequest.Controls.Add(new LiteralControl("</thead>"));
            frndrequest.Controls.Add(new LiteralControl("<tbody>"));

            int count = 0;

            while (dr.Read())
            {
                count++;


                frndrequest.Controls.Add(new LiteralControl("<tr>"));

                retu_name na = new retu_name();


                string val_t = "";


                val_t = na.name_(Int32.Parse(dr[1].ToString()));



                frndrequest.Controls.Add(new LiteralControl("<td><span class='glyphicon glyphicon-user'></span> " + val_t));

                frndrequest.Controls.Add(new LiteralControl("</td>"));

                frndrequest.Controls.Add(new LiteralControl("<td><span class='glyphicon glyphicon-check'></span> "));
                LinkButton l = new LinkButton();
                l.Text        = "Accept";
                l.CommandName = dr[0].ToString();
                EventHandler eh = new EventHandler(accept);
                l.Click += eh;



                frndrequest.Controls.Add(l);

                frndrequest.Controls.Add(new LiteralControl("</td>"));
                frndrequest.Controls.Add(new LiteralControl("<td><span class='glyphicon glyphicon-trash'></span> "));
                LinkButton l1 = new LinkButton();
                l1.Text        = "Reject";
                l1.CommandName = dr[0].ToString();
                EventHandler eh1 = new EventHandler(reject_);
                l1.Click    += eh1;
                l1.ForeColor = System.Drawing.Color.IndianRed;

                frndrequest.Controls.Add(l1);

                frndrequest.Controls.Add(new LiteralControl("</td>"));

                frndrequest.Controls.Add(new LiteralControl("</tr>"));
            }
            frndrequest.Controls.Add(new LiteralControl("</tbody></table></div>"));

            cmd.Dispose();
            cn.Close();
            if (count == 0)
            {
                frndrequest.Controls.Add(new LiteralControl("No Friend Request Found"));
            }
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            pane.Controls.Clear();
            try
            {
                SqlConnection cn = new SqlConnection();
                cn.ConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["cnstring"].ToString();
                cn.Open();

                String   s    = "";
                DateTime time = DateTime.Parse(d2.Value);

                DateTime time2 = DateTime.Parse(Date1.Value);



                if (DropDownList1.SelectedValue == "0")
                {
                    if (u_name.Value.Length > 0)
                    {
                        s = " SELECT * FROM trans where sid='" + u_name.Value + "' and tran_date between '" + time.ToString("yyyy-MM-dd") + "' and '" + time2.ToString("yyyy-MM-dd") + "'  order by id desc ";
                    }
                    else
                    {
                        s = " SELECT * FROM trans where tran_date between '" + time.ToString("yyyy-MM-dd") + "' and '" + time2.ToString("yyyy-MM-dd") + "'  order by id desc ";
                    }
                }
                else if (DropDownList1.SelectedValue == "6")
                {
                    if (u_name.Value.Length > 0)
                    {
                        s = " SELECT * FROM trans where  sid='" + u_name.Value + "' and tran_date between '" + time.ToString("yyyy-MM-dd") + "' and '" + time2.ToString("yyyy-MM-dd") + "' and ( status='4' or status='5') order by id desc ";
                    }
                    else
                    {
                        s = " SELECT * FROM trans where tran_date between '" + time.ToString("yyyy-MM-dd") + "' and '" + time2.ToString("yyyy-MM-dd") + "' and ( status='4' or status='5') order by id desc ";
                    }
                }
                else
                {
                    if (u_name.Value.Length > 0)
                    {
                        s = " SELECT * FROM trans where sid='" + u_name.Value + "' and tran_date between '" + time.ToString("yyyy-MM-dd") + "' and '" + time2.ToString("yyyy-MM-dd") + "' and status='" + DropDownList1.SelectedValue + "' order by id desc ";
                    }
                    else
                    {
                        s = " SELECT * FROM trans where tran_date between '" + time.ToString("yyyy-MM-dd") + "' and '" + time2.ToString("yyyy-MM-dd") + "' and status='" + DropDownList1.SelectedValue + "' order by id desc ";
                    }
                }



                return_ name = new return_();



                SqlCommand    cmd = new SqlCommand(s, cn);
                SqlDataReader dr  = cmd.ExecuteReader();


                int count = 0;
                while (dr.Read())
                {
                    count++;
                    //
                    if (dr[4].ToString() == "1")
                    {
                        pane.Controls.Add(new LiteralControl("<div class='alert alert-success alert-success-rw alert-dismissible' role='alert'>"));
                    }
                    else if (dr[4].ToString() == "2")
                    {
                        pane.Controls.Add(new LiteralControl("<div class='alert alert-info alert-info-rw alert-dismissible' role='alert'>"));
                    }
                    else if (dr[4].ToString() == "3")
                    {
                        pane.Controls.Add(new LiteralControl("<div class='alert alert-warning alert-warning-rw alert-dismissible' role='alert'>"));
                    }
                    else if (dr[4].ToString() == "4")
                    {
                        pane.Controls.Add(new LiteralControl("<div class='alert alert-danger alert-danger-rw alert-dismissible' role='alert'>"));
                    }
                    else if (dr[4].ToString() == "5")
                    {
                        pane.Controls.Add(new LiteralControl("<div class='alert alert-clear alert-dismissible' role='alert'>"));
                    }

                    String namee = name.bal_(dr[1].ToString(), "", 10) + " (" + dr[1].ToString() + ")";
                    string na    = namee;
                    if (dr[4].ToString() == "5")
                    {
                        namee = "<span style='Color:black'>" + na + "</span>";
                    }


                    pane.Controls.Add(new LiteralControl("<button type='button' class='close' data-dismiss='alert'><span aria-hidden='true'>&times;</span><span class='sr-only'>Close</span></button>"));
                    var sp = dr[3].ToString().Split(' ');
                    pane.Controls.Add(new LiteralControl("<h4> <span class='label' >" + namee + "</span><span class='label' style='float:right' >       " + sp.First() + "</span></h4>"));
                    pane.Controls.Add(new LiteralControl("<b>" + dr[2].ToString() + "</b></div>"));
                }
                cmd.Dispose();
                cn.Close();
                if (count == 0)
                {
                    pane.Controls.Add(new LiteralControl("<div class='alert alert-info alert-info-rw' role='alert'><b>Look ahead!</b> No Transactions Found For This Filter.</div>"));
                }
            }
            catch (Exception eqw)
            {
                Response.Write(eqw.Message);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["email"] == null)
            {
                Response.Redirect("../Index.aspx");
            }
            else
            {
                Label1.Text = "Administrator";

                if (!IsPostBack)
                {
                    SqlConnection cn = new SqlConnection();
                    cn.ConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["cnstring"].ToString();
                    cn.Open();
                    String s = " SELECT * FROM trans  order by id desc";

                    return_ name = new return_();



                    SqlCommand    cmd = new SqlCommand(s, cn);
                    SqlDataReader dr  = cmd.ExecuteReader();


                    int count = 0;
                    while (dr.Read())
                    {
                        count++;
                        //
                        if (dr[4].ToString() == "1")
                        {
                            pane.Controls.Add(new LiteralControl("<div class='alert alert-success alert-success-rw alert-dismissible' role='alert'>"));
                        }
                        else if (dr[4].ToString() == "2")
                        {
                            pane.Controls.Add(new LiteralControl("<div class='alert alert-info alert-info-rw alert-dismissible' role='alert'>"));
                        }
                        else if (dr[4].ToString() == "3")
                        {
                            pane.Controls.Add(new LiteralControl("<div class='alert alert-warning alert-warning-rw alert-dismissible' role='alert'>"));
                        }
                        else if (dr[4].ToString() == "4")
                        {
                            pane.Controls.Add(new LiteralControl("<div class='alert alert-danger alert-danger-rw alert-dismissible' role='alert'>"));
                        }
                        else if (dr[4].ToString() == "5")
                        {
                            pane.Controls.Add(new LiteralControl("<div class='alert alert-clear alert-dismissible' role='alert'>"));
                        }

                        String namee = name.bal_(dr[1].ToString(), "", 10) + " (" + dr[1].ToString() + ")";
                        string na    = namee;
                        if (dr[4].ToString() == "5")
                        {
                            namee = "<span style='Color:black'>" + na + "</span>";
                        }

                        pane.Controls.Add(new LiteralControl("<button type='button' class='close' data-dismiss='alert'><span aria-hidden='true'>&times;</span><span class='sr-only'>Close</span></button>"));
                        var sp = dr[3].ToString().Split(' ');
                        pane.Controls.Add(new LiteralControl("<h4> <span class='label' >" + namee + "</span><span class='label' style='float:right' >       " + sp.First() + "</span></h4>"));
                        pane.Controls.Add(new LiteralControl("<b>" + dr[2].ToString() + "</b></div>"));
                    }
                    cmd.Dispose();
                    cn.Close();
                    if (count == 0)
                    {
                        pane.Controls.Add(new LiteralControl("<div class='alert alert-info alert-info-rw' role='alert'><b>Look ahead!</b> No Transactions Found.</div>"));
                    }
                }
            }
        }
Beispiel #14
0
        protected void Button1_Click1(object sender, EventArgs e)
        {
            string  temp   = "";
            float   amount = 0;
            int     status = 0;
            return_ re     = new return_();

            Panel1.Visible = false;
            Panel2.Visible = false;
            int cash = Int32.Parse(re.bal_(Session["unid"].ToString(), "", 3)) - Int32.Parse(AddMoney.Value);

            if (cash > 0)
            {
                if (coupon.Value.Length > 0)
                {
                    temp = re.bal_(DropDownList1.SelectedValue.ToString(), coupon.Value, 7);

                    if (temp != "none")
                    {
                        float discount = float.Parse(temp) / 100;

                        amount = float.Parse(AddMoney.Value) - (float.Parse(AddMoney.Value) * discount);

                        add_money limi = new add_money(coupon.Value, 1, 4);
                        status = 4;
                    }
                    else
                    {
                        Panel1.Visible = true;
                        Panel2.Visible = false;
                        Label2.Text    = "Invalid Coupon ";
                    }
                }
                else
                {
                    status = 5;

                    amount = float.Parse(AddMoney.Value);
                }



                if (status == 4)
                {
                    transaction  tr   = new transaction(Session["unid"].ToString(), "Recharge of Rs " + AddMoney.Value + ". Operator - " + DropDownList1.SelectedItem + ". Discount  " + temp + "%" + ". Phone no - " + pno.Value + ".", status);
                    notification noti = new notification(Session["unid"].ToString(), DropDownList1.SelectedValue, "Recharge from " + Label1.Text + " of Rs " + AddMoney.Value + ". Discount  " + temp + "% " + ". Phone no - " + pno.Value + ".", 50);
                }
                else if (status == 5)
                {
                    transaction  tr   = new transaction(Session["unid"].ToString(), "Recharge of Rs " + AddMoney.Value + ". Operator - " + DropDownList1.SelectedItem + ". Phone no - " + pno.Value + ".", status);
                    notification noti = new notification(Session["unid"].ToString(), DropDownList1.SelectedValue, "Recharge from " + Label1.Text + " of Rs " + AddMoney.Value + ". Phone no - " + pno.Value + ".", 51);
                }
                if (status == 4 || status == 5)
                {
                    add_money mon = new add_money(Session["unid"].ToString(), amount, 2);

                    add_money mon1 = new add_money(DropDownList1.SelectedValue.ToString(), amount, 3);
                    Panel2.Visible = true;
                    Panel1.Visible = false;
                }
            }

            else
            {
                Panel1.Visible = true;
                Panel2.Visible = false;
                Label2.Text    = "You have insufficient balance";
            }
        }
Beispiel #15
0
        public void friendlist()
        {
            return_ nn     = new return_();
            String  new_my = nn.bal_("unid", Session["unid"].ToString(), 4);

            Label4.Text = new_my;
            SqlConnection cn = new SqlConnection();

            cn.ConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["cnstring"].ToString();
            cn.Open();


            String        s   = " SELECT * FROM frndz where (sid=" + new_my + " or cid=" + new_my + ")  and status=1";
            SqlCommand    cmd = new SqlCommand(s, cn);
            SqlDataReader dr  = cmd.ExecuteReader();

            frnd.Controls.Add(new LiteralControl("<div class='table-responsive'>"));
            frnd.Controls.Add(new LiteralControl("<table  class='table cart-table table-striped'>"));
            frnd.Controls.Add(new LiteralControl("<thead>"));
            frnd.Controls.Add(new LiteralControl("<tr>"));
            frnd.Controls.Add(new LiteralControl("<th>Name</th>"));
            frnd.Controls.Add(new LiteralControl("<th>Status</th>"));

            int iid = 0;

            frnd.Controls.Add(new LiteralControl("</tr>"));
            frnd.Controls.Add(new LiteralControl("</thead>"));
            frnd.Controls.Add(new LiteralControl("<tbody>"));
            int count = 0;

            while (dr.Read())
            {
                count++;


                frnd.Controls.Add(new LiteralControl("<tr>"));

                retu_name na = new retu_name();


                string val_t = "";
                if (dr[1].ToString().Equals(new_my))
                {
                    val_t = na.name_(Int32.Parse(dr[2].ToString()));
                    iid   = Int32.Parse(dr[2].ToString());
                }
                else if (dr[2].ToString().Equals(new_my))
                {
                    val_t = na.name_(Int32.Parse(dr[1].ToString()));
                    iid   = Int32.Parse(dr[1].ToString());
                }



                LinkButton b12 = new LinkButton();
                b12.Text = val_t;

                b12.Style.Add("font-size", "15px");
                b12.Attributes.Add("href", "javascript:register_popup('" + iid + "' , '" + val_t + "');");

                frnd.Controls.Add(new LiteralControl("<td><span class='glyphicon glyphicon-user'></span> "));
                frnd.Controls.Add(b12);
                frnd.Controls.Add(new LiteralControl("</td>"));

                frnd.Controls.Add(new LiteralControl("<td> <img src='css/d.png'  id='" + iid + "-i'   />"));


                frnd.Controls.Add(new LiteralControl("</td>"));

                frnd.Controls.Add(new LiteralControl("</tr>"));
            }
            frnd.Controls.Add(new LiteralControl("</tbody></table></div>"));

            cmd.Dispose();
            cn.Close();
            if (count == 0)
            {
                frnd.Controls.Add(new LiteralControl("No Friends  Found"));
            }
        }
Beispiel #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["id"] == null)
            {
                Response.Redirect("../Index.aspx");
            }
            else
            {
                return_ name = new return_();
                Label1.Text = name.bal_(Session["id"].ToString(), "companyname", 6);

                SqlConnection cn = new SqlConnection();
                cn.ConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["cnstring"].ToString();
                cn.Open();
                String        s   = " SELECT * FROM coupons where compid='" + Session["id"].ToString() + "' order by limit desc ";
                SqlCommand    cmd = new SqlCommand(s, cn);
                SqlDataReader dr  = cmd.ExecuteReader();


                int count = 0;
                int co    = 0;
                while (dr.Read())
                {
                    if (count == 0)
                    {
                        pane.Controls.Add(new LiteralControl("<div class='row'>"));
                        pane.Controls.Add(new LiteralControl("<div class='col-sm-12'>"));
                    }
                    count++;
                    co++;
                    pane.Controls.Add(new LiteralControl("<div class='col-lg-4 col-md-4 col-sm-6 mb30'>"));

                    pane.Controls.Add(new LiteralControl("<div class='view image-hover-1 no-margin'><div class='product-container'>"));
                    pane.Controls.Add(new LiteralControl("<img class='img-responsive full-width' src='../images/coupons/" + count + ".jpg' >"));
                    pane.Controls.Add(new LiteralControl("<span class='badge'>" + dr[2].ToString() + "% OFF</span>	</div>"));

                    pane.Controls.Add(new LiteralControl("<div class='mask'><div class='image-hover-content'>"));
                    pane.Controls.Add(new LiteralControl("<span style='color:white;font-size:24px' ><b>Coupon Count : " + dr[4].ToString() + "</b></span>"));
                    pane.Controls.Add(new LiteralControl("</div></div></div>"));
                    pane.Controls.Add(new LiteralControl("<div class='shop-product content-box-shadow'>"));
                    pane.Controls.Add(new LiteralControl("  <div style='text-align:center'>	<h4>Get " + dr[2].ToString() + " % cashback </h4></div>"));
                    Button l = new Button();
                    l.Text        = "Delete Coupon - " + dr[3].ToString();
                    l.CommandName = dr[0].ToString();
                    EventHandler eh = new EventHandler(delete);
                    l.Click += eh;
                    l.Attributes.Add("style", "margin-left:20px");
                    l.CssClass = "button button-glow button-rounded button-caution";

                    pane.Controls.Add(l);



                    pane.Controls.Add(new LiteralControl("</Div></Div>"));


                    if (count == 3)
                    {
                        count = 0;
                        pane.Controls.Add(new LiteralControl("</div>"));
                        pane.Controls.Add(new LiteralControl("</div>"));
                    }
                }


                cmd.Dispose();
                cn.Close();

                if (co == 0)
                {
                    pane.Controls.Add(new LiteralControl("<div class='button button-glow button-rounded button-highlight'>No Coupons Found</div><br><br><b"));
                }
            }
        }
Beispiel #17
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            return_ nn   = new return_();
            String  temp = nn.bal_("unid", uid.Value, 4);

            if (!temp.Equals("none") && (!uid.Value.Equals(Session["unid"].ToString())))
            {
                newccreturn t           = new newccreturn();
                String      new_my_temp = nn.bal_("unid", Session["unid"].ToString(), 4);
                if (t.val(Int32.Parse(new_my_temp), Int32.Parse(temp)).Equals("none"))
                {
                    Label1.Text = t.val(Int32.Parse(new_my_temp), Int32.Parse(temp));



                    SqlConnection cn = new SqlConnection();
                    cn.ConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["cnstring"].ToString();

                    try
                    {
                        cn.Open();

                        String       s   = "insert into frndz (sid,cid,status) values(@sid,@cid,@status)";
                        SqlCommand   cmd = new SqlCommand(s, cn);
                        SqlParameter p   = new SqlParameter("sid", Int32.Parse(new_my_temp));
                        SqlParameter p1  = new SqlParameter("cid", Int32.Parse(temp));
                        SqlParameter p2  = new SqlParameter("status", Int32.Parse("0"));


                        cmd.Parameters.Add(p);
                        cmd.Parameters.Add(p1);
                        cmd.Parameters.Add(p2);

                        cmd.ExecuteNonQuery();

                        cmd.Dispose();
                        cn.Close();

                        uid.Value = "";

                        Panel2.Visible = true;

                        Panel1.Visible = false;
                    }
                    catch (Exception ee)
                    {
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('" + ee.Message + "')", true);
                        Panel2.Visible = true;
                        Label3.Text    = ee.Message;
                    }
                }
                else
                {
                    Panel1.Visible = true;
                    Label2.Text    = "Friend Request already sent";
                    Panel2.Visible = false;
                }
            }
            else
            {
                Panel1.Visible = true;
                Label2.Text    = "Invalid Unique ID";
                Panel2.Visible = false;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["email"] == null)
            {
                Response.Redirect("../Index.aspx");
            }
            else
            {
                Panel2.Visible = false;
                return_ name = new return_();
                Label1.Text = "GAS";

                string s   = "";
                string mna = Request.Params["mname"].ToString();
                if (mna == "1")
                {
                    a1.Attributes.Add("class", "btn btn-rw btn-success");

                    s = " SELECT * FROM notification where rid='gas' and (status='10' or status='11') order by id desc ";
                }
                else if (mna == "2")
                {
                    a2.Attributes.Add("class", "btn btn-rw btn-success");
                    s = " SELECT * FROM notification where rid='gas' and  status='11' order by id desc ";
                }
                else if (mna == "3")
                {
                    a3.Attributes.Add("class", "btn btn-rw btn-success");
                    s = " SELECT * FROM notification where rid='gas' and status='10'  order by id desc ";
                }
                SqlConnection cn = new SqlConnection();
                cn.ConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["cnstring"].ToString();
                cn.Open();

                SqlCommand    cmd = new SqlCommand(s, cn);
                SqlDataReader dr  = cmd.ExecuteReader();
                pane.Controls.Add(new LiteralControl("<div class='table-responsive'>"));
                pane.Controls.Add(new LiteralControl("<table  class='table cart-table table-striped'>"));
                pane.Controls.Add(new LiteralControl("<thead>"));
                pane.Controls.Add(new LiteralControl("<tr>"));
                pane.Controls.Add(new LiteralControl("<th>S.No</th>"));
                pane.Controls.Add(new LiteralControl("<th>User's Unique Id</th>"));
                pane.Controls.Add(new LiteralControl("<th>Message</th>"));
                pane.Controls.Add(new LiteralControl("<th>Date</th>"));
                pane.Controls.Add(new LiteralControl("<th>Status</th>"));


                pane.Controls.Add(new LiteralControl("</tr>"));
                pane.Controls.Add(new LiteralControl("</thead>"));
                pane.Controls.Add(new LiteralControl("<tbody>"));

                int count = 0;
                while (dr.Read())
                {
                    count++;


                    pane.Controls.Add(new LiteralControl("<tr>"));
                    pane.Controls.Add(new LiteralControl("<td>"));
                    pane.Controls.Add(new LiteralControl("<span class='pill medium green'>" + count + "</span>"));
                    pane.Controls.Add(new LiteralControl("</td>"));
                    pane.Controls.Add(new LiteralControl("<td>" + dr[1].ToString()));

                    pane.Controls.Add(new LiteralControl("</td>"));

                    pane.Controls.Add(new LiteralControl("<td>" + dr[3].ToString()));

                    pane.Controls.Add(new LiteralControl("</td>"));
                    var sp = dr[5].ToString().Split(' ');
                    pane.Controls.Add(new LiteralControl("<td>" + sp[0]));

                    pane.Controls.Add(new LiteralControl("</td><td>"));

                    if (dr[4].ToString() == "10")
                    {
                        Button l = new Button();
                        l.Text        = "Dispatch";
                        l.CommandName = dr[0].ToString();
                        EventHandler eh = new EventHandler(delete);
                        l.Click += eh;
                        l.Attributes.Add("class", "button button-3d button-royal");


                        pane.Controls.Add(l);
                    }
                    else if (dr[4].ToString() == "11")
                    {
                        pane.Controls.Add(new LiteralControl("<h4><span class='label label-success'>Dispatched</span></h4>"));
                    }



                    pane.Controls.Add(new LiteralControl("</td>"));


                    pane.Controls.Add(new LiteralControl("</tr>"));
                }
                pane.Controls.Add(new LiteralControl("</tbody></table></div>"));

                cmd.Dispose();
                cn.Close();
                if (count == 0)
                {
                    pane.Controls.Add(new LiteralControl("No Record found"));
                }
            }
        }
Beispiel #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            coupons cou = new coupons();

            na_bar.Controls.Add(new LiteralControl(cou.coup_nav()));


            SqlConnection cn = new SqlConnection();

            cn.ConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["cnstring"].ToString();
            cn.Open();
            String        s    = " SELECT * FROM coupons  order by limit desc ";
            SqlCommand    cmd  = new SqlCommand(s, cn);
            SqlDataReader dr   = cmd.ExecuteReader();
            return_       name = new return_();


            int count = 0;
            int co    = 0;

            while (dr.Read())
            {
                count++;
                co++;
                string nam_ = name.bal_(dr[1].ToString(), "companyname", 9);
                myPortfolio.Controls.Add(new LiteralControl(" <li onclick='' class='item " + nam_ + " col-sm-4'><div class='border'>"));


                myPortfolio.Controls.Add(new LiteralControl("	<div class='view image-hover-1'>"));

                myPortfolio.Controls.Add(new LiteralControl("<img class='img-responsive full-width' src='../images/coupons/" + count + ".jpg' >"));

                myPortfolio.Controls.Add(new LiteralControl("<div class='mask'>   <div class='image-hover-content'>"));

                myPortfolio.Controls.Add(new LiteralControl("<b><span class='badge' style='color:white;font-size:15px' ><b> " + nam_.ToUpper() + "</b></span>"));
                myPortfolio.Controls.Add(new LiteralControl("</div></div> </div><div class='portfolio-text background-white'>	<h1 class='portfolio-title'> Get "+ dr[2].ToString() + " % cashback </h1><div class='project-category'> "));

                Button l = new Button();
                l.Text = " Coupon - " + dr[3].ToString();

                l.Attributes.Add("style", "margin-left:20px");
                l.CssClass = "button button-glow button-rounded button-caution";

                myPortfolio.Controls.Add(l);



                myPortfolio.Controls.Add(new LiteralControl("</Div> </Div></div></li>"));


                if (count == 3)
                {
                    count = 0;
                }
            }


            cmd.Dispose();
            cn.Close();

            if (co == 0)
            {
                myPortfolio.Controls.Add(new LiteralControl("<div class='button button-glow button-rounded button-highlight'>No Coupons Found</div><br><br><b"));
            }
        }
Beispiel #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["unid"] == null)
            {
                Response.Redirect("../Index.aspx");
            }
            else
            {
                return_ name = new return_();
                Label1.Text = name.bal_(Session["unid"].ToString(), "", 2);



                Panel2.Visible = false;
                SqlConnection cn = new SqlConnection();
                cn.ConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["cnstring"].ToString();
                cn.Open();
                String        s   = " SELECT * FROM notification where rid='" + Session["unid"].ToString() + "' and (status='1' or status='2') order by id desc ";
                SqlCommand    cmd = new SqlCommand(s, cn);
                SqlDataReader dr  = cmd.ExecuteReader();
                pane.Controls.Add(new LiteralControl("<div class='table-responsive'>"));
                pane.Controls.Add(new LiteralControl("<table  class='table cart-table table-striped'>"));
                pane.Controls.Add(new LiteralControl("<thead>"));
                pane.Controls.Add(new LiteralControl("<tr>"));
                pane.Controls.Add(new LiteralControl("<th>S.No</th>"));
                pane.Controls.Add(new LiteralControl("<th>Message</th>"));
                pane.Controls.Add(new LiteralControl("<th>Date</th>"));
                pane.Controls.Add(new LiteralControl("<th>Delete</th>"));

                pane.Controls.Add(new LiteralControl("</tr>"));
                pane.Controls.Add(new LiteralControl("</thead>"));
                pane.Controls.Add(new LiteralControl("<tbody>"));

                int count = 0;
                while (dr.Read())
                {
                    count++;


                    pane.Controls.Add(new LiteralControl("<tr>"));
                    pane.Controls.Add(new LiteralControl("<td>"));
                    pane.Controls.Add(new LiteralControl("<span class='pill medium green'>" + count + "</span>"));
                    pane.Controls.Add(new LiteralControl("</td>"));

                    pane.Controls.Add(new LiteralControl("<td>" + dr[3].ToString()));

                    pane.Controls.Add(new LiteralControl("</td>"));
                    var sp = dr[5].ToString().Split(' ');
                    pane.Controls.Add(new LiteralControl("<td>" + sp[0]));

                    pane.Controls.Add(new LiteralControl("</td>"));
                    pane.Controls.Add(new LiteralControl("<td>"));
                    Button l = new Button();
                    l.Text        = "Delete";
                    l.CommandName = dr[0].ToString();
                    EventHandler eh = new EventHandler(delete);
                    l.Click += eh;
                    l.Attributes.Add("class", "button button-3d button-caution");


                    pane.Controls.Add(l);

                    pane.Controls.Add(new LiteralControl("</td>"));

                    pane.Controls.Add(new LiteralControl("</tr>"));
                }
                pane.Controls.Add(new LiteralControl("</tbody></table></div>"));

                cmd.Dispose();
                cn.Close();
                if (count == 0)
                {
                    pane.Controls.Add(new LiteralControl("No Notification found"));
                }
            }
        }