public static int delete(EntitylLayer.EL objel) { SqlConnection con = new SqlConnection(@"Data Source=PRAMOD-PC\SQLEXPRESS;Initial Catalog=DBRegistration;Integrated Security=True"); con.Open(); SqlCommand cmd = new SqlCommand("spdelete", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@id", objel.Id); cmd.ExecuteNonQuery(); con.Close(); return(1); }
public static void insertdata(EntitylLayer.EL objel) { SqlConnection con = new SqlConnection(@"Data Source=PRAMOD-PC\SQLEXPRESS;Initial Catalog=DBRegistration;Integrated Security=True"); SqlCommand cmd = new SqlCommand("spinsert", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@UserName", objel.Username); cmd.Parameters.AddWithValue("@Password", objel.Password); cmd.Parameters.AddWithValue("@FirstName", objel.FirstName); cmd.Parameters.AddWithValue("@LastName", objel.LastName); cmd.Parameters.AddWithValue("@Email", objel.Email); cmd.Parameters.AddWithValue("@PhoneNo", objel.PhoneNo); cmd.Parameters.AddWithValue("@Location", objel.Location); con.Open(); cmd.ExecuteNonQuery(); con.Close(); }
public static int delete(EntitylLayer.EL objel) { return(DataLayer.DL.delete(objel)); }
public static int update(EntitylLayer.EL objel) { return(DataLayer.DL.update(objel)); }
public static void insertuser(EntitylLayer.EL objel) { DataLayer.DL.insertdata(objel); }