Exemplo n.º 1
0
        public void Update(object sender, EventArgs e)
        {
            if (this.UltraGridUstanove.ActiveRow != null)
            {
                int id = Convert.ToInt32(this.UltraGridUstanove.ActiveRow.Cells["ID"].Value);

                UstanovaForm ustanovaForm = new UstanovaForm(Enums.FormEditMode.Update, id);
                if (ustanovaForm.ShowDialogForm("Ustanova") == DialogResult.OK)
                {
                    BusinessLogic.Ustanove.pSelectedIndex = UltraGridUstanove.ActiveRow.Index;
                    LoadGridUstanove();
                }
            }
        }
Exemplo n.º 2
0
        public void Copy(object sender, EventArgs e)
        {
            if (this.UltraGridUstanove.ActiveRow != null)
            {
                int id = Convert.ToInt32(this.UltraGridUstanove.ActiveRow.Cells["ID"].Value);

                UstanovaForm ustanovaForm = new UstanovaForm(Enums.FormEditMode.Copy, id);

                if (ustanovaForm.ShowDialogForm("Ustanova") == DialogResult.OK)
                {
                    LoadGridUstanove();
                }
            }
        }
Exemplo n.º 3
0
        public void Insert(object sender, EventArgs e)
        {
            UstanovaForm ustanovaForm = new UstanovaForm(Enums.FormEditMode.Insert, null);

            if (ustanovaForm.ShowDialogForm("Ustanova") == DialogResult.OK)
            {
                try
                {
                    BusinessLogic.Ustanove.pSelectedIndex = UltraGridUstanove.ActiveRow.Index;
                }
                catch { }
                LoadGridUstanove();
            }
        }