Beispiel #1
0
 public AdaugareMeniuViewModel(Cont user)
 {
     actions = new MeniuActions();
     ListaPreparateDinMeniu = new ObservableCollection <Preparat>();
     Discount = double.Parse(ConfigurationManager.AppSettings["discountMeniu"].ToString());
     User     = user;
 }
 public MeniuViewModel(Cont user)
 {
     pAct = new MeniuActions();
     if (user != null)
     {
         if (user.statut == "Angajat")
         {
             Visibility = "Visible";
         }
         else
         {
             Visibility = "Hidden";
         }
         User = user;
     }
     else
     {
         Visibility = "Hidden";
     }
 }
 public DetaliiMeniuViewModel(Meniu meniuAles, Cont user)
 {
     actions   = new MeniuActions();
     MeniuAles = meniuAles;
     if (user != null)
     {
         User = user;
         if (user.statut == "Angajat")
         {
             Visibility = "Visible";
         }
         else
         {
             Visibility = "Hidden";
         }
     }
     else
     {
         Visibility = "Hidden";
     }
 }
Beispiel #4
0
 public AdaugareMeniuViewModel(Cont user, Meniu meniu)
 {
     actions = new MeniuActions();
     ListaPreparateDinMeniu = new ObservableCollection <Preparat>();
     Discount  = double.Parse(ConfigurationManager.AppSettings["discountMeniu"].ToString());
     NumeMeniu = meniu.denumireMeniu;
     ListaPreparateDinMeniu = actions.PreparateMeniu(meniu);
     PretFinal      = double.Parse(meniu.pret.ToString());
     PretInitial    = actions.PretMeniu(ListaPreparateDinMeniu);
     ExistingRecord = true;
     MeniuAles      = meniu;
     User           = user;
     if (user.statut == "Angajat")
     {
         Visibility = "Visible";
     }
     else
     {
         Visibility = "Hidden";
     }
 }
 public MeniuViewModel()
 {
     pAct = new MeniuActions();
 }
 public DetaliiMeniuViewModel()
 {
     actions = new MeniuActions();
 }