예제 #1
0
        public void DeleteDep(int ID)
        {
            Koneksion  cn  = new Koneksion();
            SqlCommand cmd = new SqlCommand("deletedepartamenti", cn.koneksion());

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@ID", ID);
            cmd.ExecuteNonQuery();
            cn.koneksion().Close();
        }
예제 #2
0
        public void AddDep(string img, string dep, string sqarim)
        {
            Koneksion  cn  = new Koneksion();
            SqlCommand cmd = new SqlCommand("adddepartamenti", cn.koneksion());

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@Img", img);
            cmd.Parameters.AddWithValue("@Dep", dep);
            cmd.Parameters.AddWithValue("@Sqarim", sqarim);
            cmd.ExecuteNonQuery();
            cn.koneksion().Close();
        }
예제 #3
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            HttpContext.Current.Session["ID"] = ID;
            Koneksion c1 = new Koneksion();

            c1.koneksion();
            Logo class2 = new Logo();

            class2.Logoin(TextBox1.Text, TextBox2.Text);
            class2.log(TextBox1.Text);
            HttpContext.Current.Response.Redirect("doctorLog.aspx");
        }
예제 #4
0
        public string DeleteDoc(int ID)
        {
            Koneksion  cn  = new Koneksion();
            SqlCommand cmd = new SqlCommand("deletedoctor", cn.koneksion());

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@ID", ID);

            cmd.ExecuteNonQuery();
            cn.koneksion().Close();
            return("Delete");
        }
예제 #5
0
        public DataTable SelectDep()
        {
            Koneksion  cn  = new Koneksion();
            DataSet    ds  = new DataSet();
            SqlCommand cmd = new SqlCommand("selectdepartamenti", cn.koneksion());

            cmd.CommandType = CommandType.StoredProcedure;
            SqlDataAdapter da = new SqlDataAdapter();

            da.SelectCommand = cmd;
            da.Fill(ds, "departament");
            return(ds.Tables["departament"]);
        }
예제 #6
0
        public DataTable SelectDoc()
        {
            DataSet    ds  = new DataSet();
            Koneksion  cn  = new Koneksion();
            SqlCommand cmd = new SqlCommand("selectdoctor", cn.koneksion());

            cmd.CommandType = CommandType.StoredProcedure;
            SqlDataAdapter da = new SqlDataAdapter();

            da.SelectCommand = cmd;
            da.Fill(ds, "doctor");
            return(ds.Tables["doctor"]);
        }
예제 #7
0
        public DataTable searchDoc(string name)
        {
            Koneksion  con = new Koneksion();
            DataSet    ds  = new DataSet();
            SqlCommand cmd = new SqlCommand("SeachDoctor");

            cmd.Parameters.AddWithValue("@Name", name);
            cmd.Connection  = con.koneksion();
            cmd.CommandType = CommandType.StoredProcedure;

            SqlDataAdapter adapter = new SqlDataAdapter(cmd);

            adapter.Fill(ds, "doctor");
            return(ds.Tables[0]);
        }
예제 #8
0
        public DataTable search(string a)
        {
            Koneksion  con = new Koneksion();
            DataSet    ds  = new DataSet();
            SqlCommand cmd = new SqlCommand("SearchGri");

            cmd.Parameters.AddWithValue("@Name", a);
            cmd.Parameters.AddWithValue("@IDs", HttpContext.Current.Session["ID"].ToString());

            cmd.Connection  = con.koneksion();
            cmd.CommandType = CommandType.StoredProcedure;

            SqlDataAdapter adapter = new SqlDataAdapter(cmd);

            adapter.Fill(ds, "pacient");
            return(ds.Tables[0]);
        }
예제 #9
0
        public string AddDoc(string foto, string emri, string dep, string email, string passi, string book, string teli, string work, string sat)
        {
            Koneksion  cn  = new Koneksion();
            SqlCommand cmd = new SqlCommand("adddoctor", cn.koneksion());

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@Img", foto);
            cmd.Parameters.AddWithValue("@Name", emri);
            cmd.Parameters.AddWithValue("@Departament", dep);
            cmd.Parameters.AddWithValue("@Email", email);
            cmd.Parameters.AddWithValue("@Passi", passi);
            cmd.Parameters.AddWithValue("@book", book);
            cmd.Parameters.AddWithValue("@Number", teli);
            cmd.Parameters.AddWithValue("@MonFri", work);
            cmd.Parameters.AddWithValue("@Sat", sat);
            cmd.ExecuteNonQuery();
            cn.koneksion().Close();
            return(" Save");
        }