Beispiel #1
0
 public void Insert(object sender, EventArgs e)
 {
     BusinessLogic.Primka.kontrola_stavke = false;
     BusinessLogic.Primka.pPrimkaStavke   = null;
     using (PrimkaForm objekt = new PrimkaForm(Enums.FormEditMode.Insert))
     {
         if (objekt.ShowDialogForm("Primka") == DialogResult.OK)
         {
             try
             {
                 BusinessLogic.Primka.pSelectedIndex = ugdFormPregled.Rows.Count;
             }
             catch { }
             LoadGridData();
         }
     }
 }
Beispiel #2
0
        public void Copy(object sender, EventArgs e)
        {
            if (ugdFormPregled.ActiveRow != null)
            {
                BusinessLogic.Primka.pID = (int)ugdFormPregled.ActiveRow.Cells["ID"].Value;

                using (PrimkaForm objekt = new PrimkaForm(Enums.FormEditMode.Copy))
                {
                    if (objekt.ShowDialogForm("Primka") == DialogResult.OK)
                    {
                        try
                        {
                            BusinessLogic.Primka.pSelectedIndex = ugdFormPregled.ActiveRow.Index;
                        }
                        catch { }
                        LoadGridData();
                    }
                }
            }
        }
Beispiel #3
0
        public void Update(object sender, EventArgs e)
        {
            BusinessLogic.Primka.kontrola_stavke = false;
            if (ugdFormPregled.ActiveRow != null)
            {
                BusinessLogic.Primka.pID = Convert.ToInt32(ugdFormPregled.ActiveRow.Cells["ID"].Value);

                using (PrimkaForm objekt = new PrimkaForm(Enums.FormEditMode.Update))
                {
                    if (objekt.ShowDialogForm("Primka") == DialogResult.OK)
                    {
                        try
                        {
                            BusinessLogic.Primka.pSelectedIndex = ugdFormPregled.ActiveRow.Index;
                        }
                        catch { }
                        LoadGridData();
                    }
                }
            }
        }