コード例 #1
0
        // 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));
        }
コード例 #2
0
 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));
 }