Ejemplo n.º 1
0
        public int da_update(Businesslogic bs)
        {
            SqlConnection con = new SqlConnection(str);
            SqlCommand    cmd = new SqlCommand();

            cmd.CommandText = "update_admin";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Connection  = con;

            cmd.Parameters.AddWithValue("@id", bs.stdid);
            cmd.Parameters.AddWithValue("@fn", bs.fname);
            cmd.Parameters.AddWithValue("@ln", bs.lname);
            cmd.Parameters.AddWithValue("@gn", bs.gender);
            cmd.Parameters.AddWithValue("@age", bs.age);
            cmd.Parameters.AddWithValue("@ad", bs.address);
            cmd.Parameters.AddWithValue("@st", bs.state);
            cmd.Parameters.AddWithValue("@ct", bs.city);
            cmd.Parameters.AddWithValue("@image", bs.image);

            con.Open();
            int p = cmd.ExecuteNonQuery();

            con.Close();
            return(p);
        }
Ejemplo n.º 2
0
        public DataTable da_city(Businesslogic bs)
        {
            SqlConnection con = new SqlConnection(str);
            SqlCommand    cm  = new SqlCommand();

            cm.CommandText = "sp_city";
            cm.CommandType = CommandType.StoredProcedure;
            cm.Connection  = con;
            cm.Parameters.AddWithValue("@id", bs.sid);

            SqlDataAdapter ad = new SqlDataAdapter(cm);
            DataTable      dt = new DataTable();

            ad.Fill(dt);
            return(dt);
        }
Ejemplo n.º 3
0
        public int db_insertdepartment(Businesslogic bs)
        {
            SqlConnection con = new SqlConnection(str);
            SqlCommand    cmd = new SqlCommand();

            cmd.CommandText = "insertdepartment";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Connection  = con;

            cmd.Parameters.AddWithValue("@dname", bs.dname);
            con.Open();
            int p = cmd.ExecuteNonQuery();

            con.Close();
            return(p);
        }
Ejemplo n.º 4
0
        public int da_delete(Businesslogic bs)
        {
            SqlConnection con = new SqlConnection(str);
            SqlCommand    cm  = new SqlCommand();

            cm.CommandText = "delete_student";
            cm.CommandType = CommandType.StoredProcedure;
            cm.Connection  = con;

            cm.Parameters.AddWithValue("@id", bs.stdid);

            con.Open();
            int p = cm.ExecuteNonQuery();

            con.Close();
            return(p);
        }
Ejemplo n.º 5
0
 public int bs_updatedepartment(Businesslogic bs)
 {
     return(da.db_updatedepartment(bs));
 }
Ejemplo n.º 6
0
 public int bs_insertdepartment(Businesslogic bs)
 {
     return(da.db_insertdepartment(bs));
 }
Ejemplo n.º 7
0
 public int bs_delete(Businesslogic bs)
 {
     return(da.da_delete(bs));
 }
Ejemplo n.º 8
0
 public int bs_update(Businesslogic bs)
 {
     return(da.da_update(bs));
 }
Ejemplo n.º 9
0
 public int bs_insert(Businesslogic bs)
 {
     return(da.da_insert(bs));
 }
Ejemplo n.º 10
0
 public DataTable bs_city(Businesslogic bs)
 {
     return(da.da_city(bs));
 }