private void FileFlagGridEX_ColumnButtonClick(object sender, Janus.Windows.GridEX.ColumnActionEventArgs e) { try { if (CurrentFileFlagRow() == null) { return; } if (e.Column.Key.ToUpper() == "DELETE") // verify which column button was clicked { if (FM.GetFileFlag().CanDelete(CurrentFileFlagRow())) { if (UIHelper.ConfirmDelete()) { CurrentFileFlagRow().Delete(); FileFlagBindingSource.EndEdit(); Save(); FileForm().DisplayFileFlag(); } } } } catch (Exception x) { UIHelper.HandleUIException(x); } }
private void AddFileFlagButton_Click(object sender, EventArgs e) { try { //bool flagCodeExists = FileFlagGridEX.Find(FileFlagGridEX.RootTable.Columns[3], Janus.Windows.GridEX.ConditionOperator.Equal, FlagCodeMultiDropDown.SelectedValue, 0, 1); int rowNum = FileFlagBindingSource.Find("FlagCode", FlagCodeMultiDropDown.SelectedValue); if (rowNum < 0) { atriumDB.FileFlagRow ffr; // add new appeal grounds ffr = (atriumDB.FileFlagRow)FM.GetFileFlag().Add(FM.CurrentFile); ffr.FileId = FM.CurrentFileId; ffr.FlagCode = FlagCodeMultiDropDown.SelectedValue.ToString(); ffr.EndEdit(); //FileFlagBindingSource.EndEdit(); //FileFlagGridEX.Refresh(); Save(); FileForm().DisplayFileFlag(); //FM. //OnValidated(new EventArgs()); } else { FileFlagGridEX.MoveToRowIndex(rowNum); } } catch (Exception x) { UIHelper.HandleUIException(x); } }
public void bindData(lmDatasets.SST.SSTCaseDataTable dt) { SSTM = FM.GetSSTMng(); setBindingSources(); UIHelper.ComboBoxInit(FM.Codes("vFlagCode"), FlagCodeMultiDropDown, FM); dt.ColumnChanged += new DataColumnChangeEventHandler(dt_ColumnChanged); FM.DB.FileFlag.ColumnChanged += new DataColumnChangeEventHandler(dt_ColumnChanged); SSTM.GetSSTCase().OnUpdate += new atLogic.UpdateEventHandler(ucSSTCase_OnUpdate); FM.GetFileFlag().OnUpdate += new atLogic.UpdateEventHandler(ucSSTCase_OnUpdate); AddFileFlagButton.Enabled = false; }