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); }
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); }
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); }
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); }
public int bs_updatedepartment(Businesslogic bs) { return(da.db_updatedepartment(bs)); }
public int bs_insertdepartment(Businesslogic bs) { return(da.db_insertdepartment(bs)); }
public int bs_delete(Businesslogic bs) { return(da.da_delete(bs)); }
public int bs_update(Businesslogic bs) { return(da.da_update(bs)); }
public int bs_insert(Businesslogic bs) { return(da.da_insert(bs)); }
public DataTable bs_city(Businesslogic bs) { return(da.da_city(bs)); }