コード例 #1
0
 public void Insert(object sender, EventArgs e)
 {
     using (uscOznakaPrimitka user_control = new uscOznakaPrimitka(Enums.FormEditMode.Insert))
     {
         if (user_control.ShowDialogForm("Oznaka primitka") == DialogResult.OK)
             LoadGridOznakaPrimitka();
     }
 }
コード例 #2
0
        public void Update(object sender, EventArgs e)
        {
            if (ugdOznakaPrimitka.ActiveRow != null)
            {
                BusinessLogic.pID = (int)ugdOznakaPrimitka.ActiveRow.Cells["ID"].Value;
                BusinessLogic.pOznaka = ugdOznakaPrimitka.ActiveRow.Cells["Oznaka"].Value.ToString();
                BusinessLogic.pKratkiOpis = ugdOznakaPrimitka.ActiveRow.Cells["KratkiOpis"].Value.ToString();
                BusinessLogic.pDugiOpis = ugdOznakaPrimitka.ActiveRow.Cells["DugiOpis"].Value.ToString();

                using (uscOznakaPrimitka user_control = new uscOznakaPrimitka(Enums.FormEditMode.Update))
                {
                    if (user_control.ShowDialogForm("Oznaka primitka") == DialogResult.OK)
                        LoadGridOznakaPrimitka();
                }
            }
        }