コード例 #1
0
        private void repositoryItemchkPrint_CheckedChanged(object sender, EventArgs e)
        {
            // Get your currently selected grid row
            var rowHandle = gridView_Excercise.FocusedRowHandle;
            // Get the value for the given column - convert to the type you're expecting
            bool print = bool.Parse(gridView_Excercise.GetRowCellValue(rowHandle, "Prints").ToString());
            if (!print)
            {
                // Get the value for the given column - convert to the type you're expecting
                string ID = gridView_Excercise.GetRowCellValue(rowHandle, "ID").ToString();
                Exercise ex = new Exercise();
                ex.ID = int.Parse(ID);
                ex.TenExercises = gridView_Excercise.GetRowCellValue(rowHandle, "TenExercises").ToString();
                ex.URLImage = gridView_Excercise.GetRowCellValue(rowHandle, "img").ToString();

                if (gridView_Excercise.GetRowCellValue(rowHandle, "Move") != null)
                    ex.Move = (int)gridView_Excercise.GetRowCellValue(rowHandle, "Move");
                else
                    ex.Move = 0;
                gridView_Excercise.SetRowCellValue(rowHandle, "Prints", true);

                frm_ListPatient_AddPatient_ExerciseOptions child = new frm_ListPatient_AddPatient_ExerciseOptions { EX = ex };
                child.AddItemCallback = new AddItemDelegate(this.AddItemCallback);
                child.ShowDialog();
            }
            else
            {
                gridView_Excercise.SetRowCellValue(rowHandle, "Hold", null);
                gridView_Excercise.SetRowCellValue(rowHandle, "Do", null);
                gridView_Excercise.SetRowCellValue(rowHandle, "Repeat", null);
                gridView_Excercise.SetRowCellValue(rowHandle, "Range", null);
                gridView_Excercise.SetRowCellValue(rowHandle, "Resistance", null);
                gridView_Excercise.SetRowCellValue(rowHandle, "Direction", null);
                gridView_Excercise.SetRowCellValue(rowHandle, "Prints", false);
            }
        }
コード例 #2
0
 partial void UpdateExercise(Exercise instance);
コード例 #3
0
 partial void DeleteExercise(Exercise instance);
コード例 #4
0
 partial void InsertExercise(Exercise instance);