void EntityNew(object sender, DatEventArgs e) { try { BaseDat dat = new CD(); if (TreeList.TreeV.Value == null) { MessageBox.Show("Не задана ветка, в которой создается карточка !", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { ((ICardDat)dat).Parent_FP = ((ITreeDat)TreeList.TreeV.Value).FP; if (EntityForm == null) { throw new Exception("Не определена форма для редактирования карточки"); } EntityForm.OldValue = dat; EntityForm.BindControls(EntityForm); if (EntityForm.ShowDialog() == DialogResult.OK) { Refresh(); } gridMain.Grid.Value = dat; } } catch (Exception Ex) { MessageBox.Show(Common.ExMessage(Ex), "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
void ddController_DatValueSelected(object sender, DatEventArgs e) { BaseDat dat = e.DatEntity; Editor.Value = dat; CloseDropDown(); //Console.WriteLine("ddController_DatValueSelected"); }
void grid_ValueChanged(object sender, DatEventArgs e) { if (e.DatEntity != null) { SetStatusID(((IDat)e.DatEntity).ID); //SetStatusText(e.DatEntity.ToString()); } }
void TreeChanged(object sender, DatEventArgs e) { ITreeDat tree = (ITreeDat)e.DatEntity; SetList.FilterReset(); SetList.LoadFilter = new SQLFilter(); SetList.LoadFilter.AddWhere(new FilterString("Parent_FP", tree.FP.ToString())); Refresh(); gridMain.captList.Caption = Caption + " [ветка '" + tree.Name + "']"; }
void EntityChanged(object sender, DatEventArgs e) { try { if (e.DatEntity != null && PanelRTF != null) { PanelCaption.Caption = "Детали карточки '" + e.DatEntity.ToString() + "':"; PanelRTF.Rtf = e.DatEntity.GetRTFDoc(); } } catch (Exception Ex) { MessageBox.Show(Common.ExMessage(Ex), "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
void EntitySelected(object sender, DatEventArgs e) { try { EntityForm.OldValue = e.DatEntity; EntityForm.BindControls(EntityForm); if (EntityForm.ShowDialog() == DialogResult.OK) { Refresh(); } } catch (Exception Ex) { MessageBox.Show(Common.ExMessage(Ex), "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
void grid_ValueChanged(object sender, DatEventArgs e) { if (e.DatEntity != null) { SysAuditDat dat = e.DatEntity as SysAuditDat; //dat.FillExtraMembers(); dat.Details.Load(); iidc.Grid.ValueEventDisabled = true; iidc.Grid.SetDataSource(dat.Details.DetSet); iidc.Grid.ValueEventDisabled = false; captEntity.Caption = string.Format("Таблица: {0}, ID={1}, Операция: {2}, Кто: {3}, Когда: {4:dd.MM.yyyy HH:mm:ss.ms}", dat.Tbl, dat.Info.id, dat.OperationType, dat.Usr, dat.Dt); } else { iidc.Grid.SetDataSource(null); } }
void EntitySelected(object sender, DatEventArgs e) { try { if (EntityForm == null) { throw new Exception("Не определена форма для редактирования карточки"); } EntityForm.OldValue = e.DatEntity; EntityForm.BindControls(EntityForm); if (EntityForm.ShowDialog() == DialogResult.OK) { Refresh(); } } catch (Exception Ex) { MessageBox.Show(Common.ExMessage(Ex), "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
protected virtual void OnValueChanged(DatEventArgs e) { FireDatValueChanged(e.DatEntity); }
protected override void OnValueChanged(DatEventArgs e) { base.OnValueChanged(e); }
protected override void OnValueSelected(DatEventArgs e) { Select(e.DatEntity as CD); }
void ddController_DatValueChanged(object sender, DatEventArgs e) { //Console.WriteLine("ddController_DatValueChanged {0}",e.DatEntity); }