static bool Delete(Project_Equipment p)
 {
     pmanAPI.App_Data.pmanDBTableAdapters.Project_EquipmentTableAdapter ta = new pmanAPI.App_Data.pmanDBTableAdapters.Project_EquipmentTableAdapter();
     return  ta.DeleteByID(p.project_id) == 0?false:true;
 }
        public static bool UpdateByID(Project_Equipment o)
        {
            o.modifydate = DateTime.Now;
            pmanAPI.App_Data.pmanDBTableAdapters.Project_EquipmentTableAdapter ta = new pmanAPI.App_Data.pmanDBTableAdapters.Project_EquipmentTableAdapter();
            int ret  = ta.UpdateByID(
              o.camera_x2,
              o.camera_50D,
              o.lights_650WArri,
              o.lights_300WArri,
              o.lights_softbox,
              o.mic_shotgun,
              o.mic_wireliess_lav,
              o.mic_ktec_booms,
              o.monitor,
              o.tripod_miller,
              o.tripod_sachtler,
              o.cables_coax,
              o.c_stands,
              o.tape,
              o.backdrops,
              o.teleprompter,
              o.steadicam,
              o.switcher,
              o.audio_marantz,
              o.audio_other,
              o.firestore,
              o.battery_dionic,
              o.battery_charger,
              o.battery_aa,
              o.battery_aaa,
              o.battery_9volt,
              o.createdate,
              o.modifydate,
              o.project_id

               );
               if(ret == 1) return true;
               return false;
        }
 public static List<Project_Equipment> GetAll()
 {
     pmanAPI.App_Data.pmanDBTableAdapters.Project_EquipmentTableAdapter ta = new pmanAPI.App_Data.pmanDBTableAdapters.Project_EquipmentTableAdapter();
     pmanAPI.App_Data.pmanDB.Project_EquipmentDataTable table = ta.GetData();
     return LoadFromModel(table);
 }
        public static Project_Equipment GetByID(int id)
        {
            try{
               pmanAPI.App_Data.pmanDBTableAdapters.Project_EquipmentTableAdapter ta = new pmanAPI.App_Data.pmanDBTableAdapters.Project_EquipmentTableAdapter();
               pmanAPI.App_Data.pmanDB.Project_EquipmentDataTable table = ta.GetDataByID(id);
               pmanAPI.App_Data.pmanDB.Project_EquipmentRow row = (pmanAPI.App_Data.pmanDB.Project_EquipmentRow)table.Rows[0];

               return Project_Equipment.LoadFromModel(row);
               }
               catch(Exception){
               return null;
               }
        }
 public static bool Exists(int id)
 {
     pmanAPI.App_Data.pmanDBTableAdapters.Project_EquipmentTableAdapter ta = new pmanAPI.App_Data.pmanDBTableAdapters.Project_EquipmentTableAdapter();
     if (Convert.ToInt32(ta.GetSumByID(id)) == 0)
         return false;
     return true;
 }