protected override void process_after_raise_on_event(CC1InplaceEdittingOnEventArgs i_obj_event_arg, CancelEventArgs i_obj_cancel_arg) { m_fg.BeforeRowColChange -= this.catch_m_fg_before_row_col_change; switch (i_obj_event_arg.next_action) { case e_CC1_inplace_editting_next_action.cancel_editting: CancelEdit(); break; case e_CC1_inplace_editting_next_action.success_and_change_to_none_status: if (m_e_mode == e_CC1InplaceEdittingMode.delete_mode) { m_fg.Rows.Remove(m_fg.Row); } m_b_commit_successful = true; m_e_mode = e_CC1InplaceEdittingMode.none; break; case e_CC1_inplace_editting_next_action.continue_editting: i_obj_cancel_arg.Cancel = true; break; } m_fg.BeforeRowColChange += this.catch_m_fg_before_row_col_change; }
protected virtual void CommitEdit_when_RowColChange(CancelEventArgs e) { CC1InplaceEdittingOnEventArgs v_obj_even_arg = new CC1InplaceEdittingOnEventArgs(e_CC1_inplace_editting_next_action.success_and_change_to_none_status); switch (m_e_mode) { case e_CC1InplaceEdittingMode.insert_mode: if (OnInsertEvent != null) OnInsertEvent(this, v_obj_even_arg); break; case e_CC1InplaceEdittingMode.update_mode: if (OnUpdateEvent != null) OnUpdateEvent(this, v_obj_even_arg); break; case e_CC1InplaceEdittingMode.delete_mode: if (OnDeleteEvent != null) OnDeleteEvent(this, v_obj_even_arg); break; case e_CC1InplaceEdittingMode.none: break; } process_after_raise_on_event(v_obj_even_arg, e); }
protected virtual void process_after_raise_on_event(CC1InplaceEdittingOnEventArgs i_obj_event_arg, CancelEventArgs i_obj_cancel_arg) { switch (i_obj_event_arg.next_action) { case e_CC1_inplace_editting_next_action.cancel_editting: CancelEdit(); break; case e_CC1_inplace_editting_next_action.success_and_change_to_none_status: m_b_commit_successful = true; m_e_mode = e_CC1InplaceEdittingMode.none; break; case e_CC1_inplace_editting_next_action.continue_editting: i_obj_cancel_arg.Cancel = true; break; } }
private void m_obj_edit_controller_OnUpdate(object sender, CC1InplaceEdittingOnEventArgs e) { try { m_us_cur.Update(); CC1InplaceEdittingOnEventArgs v_e = new CC1InplaceEdittingOnEventArgs(e_CC1_inplace_editting_next_action.success_and_change_to_none_status); if (OnUpdateEvent != null) OnUpdateEvent(this, v_e); if (v_e.next_action == e_CC1_inplace_editting_next_action.success_and_change_to_none_status) { m_us_cur.CommitTransaction(); us_object_2_grid(m_us_cur, m_fg.Row); e.next_action = e_CC1_inplace_editting_next_action.success_and_change_to_none_status; } } catch (Exception v_e) { CDBExceptionHandler v_objErrHandler = new CDBExceptionHandler(v_e, new CDBClientDBExceptionInterpret()); v_objErrHandler.showErrorMessage(); e.next_action = e_CC1_inplace_editting_next_action.continue_editting; } }