예제 #1
0
    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        con.Open();
        String         email = "";
        string         name  = "";
        string         ph    = "";
        int            id    = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value.ToString());
        SqlDataAdapter sda   = new SqlDataAdapter("Select * from tbl_doctor where d_id='" + id + "'", con);
        DataTable      dt    = new DataTable();

        sda.Fill(dt);
        if (dt.Rows.Count > 0)
        {
            email = obj.DecryptString(dt.Rows[0]["d_email"].ToString());
            name  = dt.Rows[0]["d_name"].ToString();
            ph    = dt.Rows[0]["d_contact"].ToString();
        }
        string s   = obj.DecryptString(ph);
        string dph = "+966" + s.ToString();

        ob1.Message(dph.ToString(), "sorry!!  " + name + " your account rejected from Hakkeem");


        string dph1 = "+91" + s.ToString();

        ob1.Message(dph1.ToString(), "sorry!!  " + name + " your account rejected from Hakkeem");
        Email_To_AccountRejection(email);
        // Email(email, "sorry!!  " + name + " your account rejected from Hakkeem");

        if (con.State.ToString() == "Closed")
        {
            con.Open();
        }
        //SqlCommand cmd8 = new SqlCommand("Delete from tbl_doctor_location where d_id='" + id + "'", con);
        //cmd8.ExecuteNonQuery();
        SqlCommand cmd = new SqlCommand("Delete from tbl_doctor where d_id='" + id + "'", con);

        cmd.ExecuteNonQuery();
        con.Close();
        doctor_rqst();
        //if (Session["Language"].ToString() == "Auto")
        //{

        Response.Redirect("~/BookDoc Admin/Doctor request.aspx");
        //}
        //else
        //{
        //    Response.Redirect("~/BookDoc Admin/Doctor request.aspx?l=ar-EG");
        //}
    }
예제 #2
0
    public void users()
    {
        //var user = from item in db.tbl_temp_signups orderby item.id descending select item;
        con.Open();
        SqlDataAdapter Sda = new SqlDataAdapter("Select * from tbl_temp_signup order by id desc", con);
        DataTable      dt  = new DataTable();

        Sda.Fill(dt);
        if (dt.Rows.Count > 0)
        {
            GridView1.DataSource = dt;
            GridView1.DataBind();
        }

        foreach (GridViewRow gr in GridView1.Rows)
        {
            string hakkeemid = (gr.FindControl("Label2") as Label).Text;
            string contact   = (gr.FindControl("Label3") as Label).Text;

            Label lbl3 = gr.FindControl("Label3") as Label;

            string s = obj.DecryptString(lbl3.Text);
            if (s.StartsWith("5") == true)
            {
                lbl3.Text = "+966" + s;
            }
            else
            {
                lbl3.Text = "+91" + s;
            }
        }
        con.Close();
    }
예제 #3
0
    public void doctor()
    {
        con.Open();
        SqlDataAdapter Sda = new SqlDataAdapter("Select * from tbl_temp_doctor order by d_id desc", con);
        DataTable      dt  = new DataTable();

        Sda.Fill(dt);
        if (dt.Rows.Count > 0)
        {
            GridView1.DataSource = dt;
            GridView1.DataBind();
        }


        foreach (GridViewRow gr in GridView1.Rows)
        {
            Label cno = new Label();
            cno = (Label)GridView1.Rows[gr.RowIndex].FindControl("Label11");

            string lno  = obj.DecryptString(cno.Text);
            Label  lno1 = new Label();
            lno1      = (Label)GridView1.Rows[gr.RowIndex].FindControl("Label11");
            lno1.Text = lno;


            Label email = new Label();
            email = (Label)GridView1.Rows[gr.RowIndex].FindControl("Label12");


            string lemail = obj.DecryptString(email.Text);
            Label  email1 = new Label();
            email1      = (Label)GridView1.Rows[gr.RowIndex].FindControl("Label12");
            email1.Text = lemail;
            //
        }
    }