示例#1
0
 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);
     }
 }
示例#2
0
        void ddController_DatValueSelected(object sender, DatEventArgs e)
        {
            BaseDat dat = e.DatEntity;

            Editor.Value = dat;
            CloseDropDown();
            //Console.WriteLine("ddController_DatValueSelected");
        }
示例#3
0
 void grid_ValueChanged(object sender, DatEventArgs e)
 {
     if (e.DatEntity != null)
     {
         SetStatusID(((IDat)e.DatEntity).ID);
         //SetStatusText(e.DatEntity.ToString());
     }
 }
示例#4
0
        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 + "']";
        }
示例#5
0
 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);
     }
 }
示例#6
0
 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);
     }
 }
示例#7
0
 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);
     }
 }
示例#8
0
        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);
            }
        }
示例#9
0
 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);
 }
示例#12
0
 void ddController_DatValueChanged(object sender, DatEventArgs e)
 {
     //Console.WriteLine("ddController_DatValueChanged {0}",e.DatEntity);
 }