Exemplo n.º 1
0
        public IHttpActionResult PutServiceProviderUser(int id, ServiceProviderUser serviceProviderUser)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != serviceProviderUser.Id)
            {
                return(BadRequest());
            }

            db.Entry(serviceProviderUser).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ServiceProviderUserExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
Exemplo n.º 2
0
        public IHttpActionResult GetServiceProviderUser(int id)
        {
            ServiceProviderUser serviceProviderUser = db.ServiceProviderUsers.Find(id);

            if (serviceProviderUser == null)
            {
                return(NotFound());
            }

            return(Ok(serviceProviderUser));
        }
Exemplo n.º 3
0
        public IHttpActionResult PostServiceProviderUser(ServiceProviderUser serviceProviderUser)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.ServiceProviderUsers.Add(serviceProviderUser);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = serviceProviderUser.Id }, serviceProviderUser));
        }
Exemplo n.º 4
0
        public void newupTable_Click(object sender, MouseEventArgs e)
        {
            label1.Text = ((Button)sender).Name;
            string table_name = ((Button)sender).Text;

            if (long_press == false)
            {
                loopTimer.Stop();
                loopTimer.Dispose();
                Control ctls = this.Parent;
                if (codeForprinting == "C80")
                {
                    DataTable dt1 = bld.GetServiceProvider();
                    if (dt1.Rows.Count > 0)
                    {
                        ServiceProviderUser vieret = new ServiceProviderUser();
                        vieret.ShowDialog();
                        KOTOrder ss = new KOTOrder(label1.Text, table_name);
                        ctls.Controls.Clear();
                        ctls.Controls.Add(ss);
                    }
                    else
                    {
                        KOTOrder vieret = new KOTOrder(label1.Text, table_name);
                        ctls.Controls.Clear();
                        ctls.Controls.Add(vieret);
                    }
                }
                else
                {
                    KOTOrder vieret = new KOTOrder(label1.Text, table_name);
                    ctls.Controls.Clear();
                    ctls.Controls.Add(vieret);
                }
            }

            else
            {
                Control          ctrl = this.Parent;
                KitchenOrderInfo koi  = new KitchenOrderInfo();
                koi.table_no = (((Button)sender).Name).ToString();
                //koi.table_names = ((Button)sender).Text;
                koi.ShowDialog();
                if (koi.DialogResult == DialogResult.OK)
                {
                    KOTOrder vieret = new KOTOrder(label1.Text, table_name);
                    ctrl.Controls.Clear();
                    ctrl.Controls.Add(vieret);
                }
            }
            long_press = false;
        }
Exemplo n.º 5
0
        public IHttpActionResult DeleteServiceProviderUser(int id)
        {
            ServiceProviderUser serviceProviderUser = db.ServiceProviderUsers.Find(id);

            if (serviceProviderUser == null)
            {
                return(NotFound());
            }

            db.ServiceProviderUsers.Remove(serviceProviderUser);
            db.SaveChanges();

            return(Ok(serviceProviderUser));
        }