// Same can be used for deactive user public bool DeleteResource(int resourceID) { SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@ResourceID", resourceID) }; return(SqlDBHelper.ExecuteNonQuery("DeleteResource", CommandType.StoredProcedure, parameters)); }
public bool UpdateResource(Resource resource) { SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@ResourceID", resource.ResourceID), new SqlParameter("@FirstName", resource.FirstName), new SqlParameter("@LastName", resource.LastName), new SqlParameter("@SOW", resource.SOW), new SqlParameter("@PONumber", resource.PONumber), new SqlParameter("@SONumber", resource.SONumber), new SqlParameter("@StartDate", resource.StartDate), new SqlParameter("@EndDate", resource.EndDate), new SqlParameter("@BillingType", resource.BillingType), new SqlParameter("@ProjectName", resource.ProjectName), new SqlParameter("@Location", resource.Location), new SqlParameter("@HourlyRate", resource.HourlyRate), new SqlParameter("@Status", resource.Status), }; return(SqlDBHelper.ExecuteNonQuery("UpdateResource", CommandType.StoredProcedure, parameters)); }