Example #1
0
 public string GetTypeOfPrikaz(IViewResults frm, string name)
 {
     try
     {
         return(PrikazRepos.Instance().GetPrikazByName(name).Type);
     }
     catch (CrtajMeException e)
     {
         frm.ShowErrorMessage(e.getMsg());
     }
     return("-");
 }
Example #2
0
 public string GetAverageGrade(IViewResults frm, string name)
 {
     try
     {
         return(SkupRepos.Instance().GetSkupByName(name).AverageGrade.ToString());
     }
     catch (CrtajMeException e)
     {
         frm.ShowErrorMessage(e.getMsg());
     }
     return("-");
 }
Example #3
0
 public void RemovePrikazFromSkup(IViewResults frm, string prikazName, string skupName)
 {
     try
     {
         Skup   s = SkupRepos.Instance().GetSkupByName(skupName);
         Prikaz p = PrikazRepos.Instance().GetPrikazByName(prikazName);
         s.DeletePrikaz(p);
         frm.ShowDetails();
     }
     catch (CrtajMeException e)
     {
         frm.ShowErrorMessage(e.getMsg());
     }
 }
Example #4
0
 public void InsertPrikazInSKup(IViewResults frm, string prikazName, string skupName)
 {
     try
     {
         Prikaz p = PrikazRepos.Instance().GetPrikazByName(prikazName);
         Skup   s = SkupRepos.Instance().GetSkupByName(skupName);
         s.AddPrikaz(p);
         frm.ShowDetails();
     }
     catch (CrtajMeException e)
     {
         frm.ShowErrorMessage(e.getMsg());
     }
 }
Example #5
0
        public List <string> GetPrikaziInSkup(IViewResults frm, string name)
        {
            List <string> ret = new List <string>();

            try
            {
                ret = SkupRepos.Instance().GetSkupByName(name).GetListNameOfPrikaz();
                return(ret);
            }
            catch (CrtajMeException e)
            {
                frm.ShowErrorMessage(e.getMsg());
            }
            return(ret);
        }
Example #6
0
 public string GetAccept(IViewResults frm, string name)
 {
     try
     {
         bool acc = SkupRepos.Instance().GetSkupByName(name).Accept;
         if (acc == true)
         {
             return("DA");
         }
         else
         {
             return("NE");
         }
     }
     catch (CrtajMeException e)
     {
         frm.ShowErrorMessage(e.getMsg());
     }
     return("-");
 }
Example #7
0
 /// <summary>
 /// Odstranjuje se forma iz subjecta
 /// </summary>
 /// <param name="frm"></param>
 public void RemoveForm(IViewResults frm)
 {
     SkupRepos.Instance().removeObserver(frm);
 }
Example #8
0
 public void ShowResultsView(IViewResults frm)
 {
     SkupRepos.Instance().addObserver(frm);
     PrikazRepos.Instance().addObserver(frm);
     frm.ShowView();
 }