Esempio n. 1
0
 public void Insert(object sender, EventArgs e)
 {
     using (uscObracuni uscObracuni = new uscObracuni(Enums.FormEditMode.Insert, null))
     {
         uscObracuni.uneObracunKolicina.Enabled = true;
         uscObracuni.ShowDialogForm("Podaci obračuna");
         try
         {
             BusinessLogic.Obracuni.pSelectedIndex = ugdObracuni.ActiveRow.Index;
         }
         catch { }
         LoadGridObracuni();
     }
 }
Esempio n. 2
0
        public void Copy(object sender, EventArgs e)
        {
            if (this.ugdObracuni.ActiveRow != null)
            {
                Obracuni.pID             = (int)ugdObracuni.ActiveRow.Cells["ID"].Value;
                Obracuni.pNaziv          = ugdObracuni.ActiveRow.Cells["Naziv"].Value.ToString();
                Obracuni.pMjesecObracuna = (int)ugdObracuni.ActiveRow.Cells["Za mjesec"].Value;
                Obracuni.pGodinaObracuna = (int)ugdObracuni.ActiveRow.Cells["Za godinu"].Value;

                using (uscObracuni uscObracuni = new uscObracuni(Enums.FormEditMode.Copy, Obracuni.pID))
                {
                    uscObracuni.ShowDialogForm("Podaci obračuna");
                    BusinessLogic.Obracuni.pSelectedIndex = ugdObracuni.ActiveRow.Index;
                    LoadGridObracuni();
                }
            }
        }
Esempio n. 3
0
        public void Update(object sender, EventArgs e)
        {
            if (ugdObracuni.ActiveRow != null)
            {
                Obracuni.pID                = (int)ugdObracuni.ActiveRow.Cells["ID"].Value;
                Obracuni.pNaziv             = ugdObracuni.ActiveRow.Cells["Naziv"].Value.ToString();
                Obracuni.pMjesecObracuna    = (int)ugdObracuni.ActiveRow.Cells["Za mjesec"].Value;
                Obracuni.pGodinaObracuna    = (int)ugdObracuni.ActiveRow.Cells["Za godinu"].Value;
                Obracuni.pkolicinaZaObracun = (int)ugdObracuni.ActiveRow.Cells["Količina"].Value;
                Obracuni.pValutaPlacanja    = (DateTime)ugdObracuni.ActiveRow.Cells["Valuta plačanja"].Value;
                Obracuni.zaduzen            = Convert.ToBoolean(ugdObracuni.ActiveRow.Cells["Kreirani računi"].Value);

                using (uscObracuni uscObracuni = new uscObracuni(Enums.FormEditMode.Update, Obracuni.pID))
                {
                    uscObracuni.uneObracunKolicina.Enabled = false;
                    uscObracuni.ShowDialogForm("Podaci obračuna");
                    BusinessLogic.Obracuni.pSelectedIndex = ugdObracuni.ActiveRow.Index;
                    LoadGridObracuni();
                }
            }
        }