Exemplo n.º 1
0
 public PemasanganViewModel(INavigation nav)
 {
     Model = new PemasanganModel();
     NavigationEventArgs = nav;
     ResetCommand        = new Command(ResetAction);
     SaveCommand         = new Command(SaveAction);
 }
Exemplo n.º 2
0
 public PerubahanViewModel(INavigation nav)
 {
     Model = new PemasanganModel();
     Items = new List <JenisPemasangan>();
     Items.Add(JenisPemasangan.UbahDaya);
     Items.Add(JenisPemasangan.UbahTarif);
     NavigationEventArgs = nav;
     ResetCommand        = new Command(ResetAction);
     SaveCommand         = new Command(SaveAction);
 }
Exemplo n.º 3
0
 // PUT: api/AdminPelanggan/5
 public async Task <IHttpActionResult> Put(int id, [FromBody] PemasanganModel value)
 {
     try
     {
         return(Ok(await domain.SaveChange(value)));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }
Exemplo n.º 4
0
        public async Task <IHttpActionResult> Post([FromBody] PemasanganModel value)
        {
            try
            {
                var pel = await User.PelangganProfile();

                value.IdPelanggan = pel.IdPelanggan;
                return(Ok(await domain.SaveChange(value)));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }
Exemplo n.º 5
0
 private void ResetAction(object obj)
 {
     Model = new PemasanganModel();
 }