                         }
                         
                         if textflag {
-                            //TODO: あとで修正
                             //新規レコードの作成
-//                            let newrecord = CommonMethod().CreateShiftSystemDBRecord(self.records[section][row].id,shiftname: textFields![0].text!, shiftgroup: textFields![1].text!, shifttime: textFields![2].text!, shiftstarttimerow: self.shiftstarttimeselectrow, shiftendtimerow: self.shiftendtimeselectrow)
-//                            
-//                            //編集前のレコードを削除
-//                            DBmethod().DeleteRecord(self.records[section][row])
-//                            
-//                            //編集後のレコードを追加
-//                            DBmethod().AddandUpdate(newrecord, update: true)
+                            let newrecord = CommonMethod().CreateShiftSystemDBRecord(self.records[section][row].id,shiftname: textFields![0].text!, shiftgroup: textFields![1].text!, shifttime: textFields![2].text!, shiftstarttimerow: self.shiftstarttimeselectrow, shiftendtimerow: self.shiftendtimeselectrow, shiftmanager: textFields![3].text!)
+
+                            //編集前のレコードを削除
+                            DBmethod().DeleteRecord(self.records[section][row])
+
+                            //編集後のレコードを追加
+                            DBmethod().AddandUpdate(newrecord, update: true)
                             
                             //ソートする
                             DBmethod().ShiftSystemDBSort()

    
    var shiftgroupnameUIPicker: UIPickerView = UIPickerView()
    var shifttimeUIPicker: UIPickerView = UIPickerView()
    var pickerviewtoolBar = UIToolbar()
    var pickerdoneButton = UIBarButtonItem()
    let shiftgroupname = CommonMethod().GetShiftGroupName()
    var shiftgroupnametextfield = UITextField()
    var shifttimetextfield = UITextField()

    var starttime = ""
    var endtime = ""

        if pickerView.tag == 2 {
            pickerdoneButton.tag = 2
            return shiftgroupname.count
        }else if pickerView.tag == 3 {
            pickerdoneButton.tag = 3
            if component == 0 {
                return time.count
