public bool updateData(DTO.DTO_Office office) { try { SqlCommand command = getCommand("updateOffice"); command.Parameters.Add("@officeID", System.Data.SqlDbType.VarChar).Value = office.OfficeID; command.Parameters.Add("@officeName", System.Data.SqlDbType.VarChar).Value = office.OfficeName; return(command.ExecuteNonQuery() >= 0); } catch { return(false); } }
public bool insertData(DTO.DTO_Office newOffice) { try { SqlConnection con = DAL.DAL_DB_Connect.connection; SqlCommand command = new SqlCommand("insertOffice", con); command.Parameters.Add("@officeID", System.Data.SqlDbType.VarChar).Value = newOffice.OfficeID; command.Parameters.Add("@officeName", System.Data.SqlDbType.VarChar).Value = newOffice.OfficeName; command.CommandType = System.Data.CommandType.StoredProcedure; return(command.ExecuteNonQuery() >= 0); } catch { return(false); } }
public bool updateData(DTO.DTO_Office office) { return(new DAL.DAL_Office().updateData(office)); }
public bool insertData(DTO.DTO_Office office) { return(new DAL.DAL_Office().insertData(office)); }