Beispiel #1
0
        public void Update(object sender, EventArgs e)
        {
            if (this.UltraCjenici.ActiveRow != null)
            {
                int        id          = Convert.ToInt32(this.UltraCjenici.ActiveRow.Cells["ID"].Value);
                CjenikForm cjenikeForm = new CjenikForm(Enums.FormEditMode.Update, id);

                cjenikeForm.ShowDialogForm("Proizvodi, cjenici, olakšice > Cjenici");
                BusinessLogic.Cjenici.pSelectedIndex = UltraCjenici.ActiveRow.Index;
                LoadGridCjenici();
            }
        }
Beispiel #2
0
        public void Insert(object sender, EventArgs e)
        {
            CjenikForm cjenikeForm = new CjenikForm(Enums.FormEditMode.Insert, null);

            cjenikeForm.ShowDialogForm("Proizvodi, cjenici, olakšice > Cjenici");
            try
            {
                BusinessLogic.Cjenici.pSelectedIndex = UltraCjenici.ActiveRow.Index;
            }
            catch { }
            LoadGridCjenici();
        }
Beispiel #3
0
        public void Copy(object sender, EventArgs e)
        {
            if (this.UltraCjenici.ActiveRow != null)
            {
                int id = Convert.ToInt32(this.UltraCjenici.ActiveRow.Cells["ID"].Value);

                CjenikForm olaksice = new CjenikForm(Enums.FormEditMode.Copy, id);

                if (olaksice.ShowDialogForm("Proizvodi, cjenici, olakšice > Cjenici") == DialogResult.OK)
                {
                    BusinessLogic.Cjenici.pSelectedIndex = UltraCjenici.ActiveRow.Index;
                    LoadGridCjenici();
                }
            }
        }