コード例 #1
0
        protected void onOkButtonClicked(object sender, EventArgs e)
        {
            using (var db = new BizeeBirdDbContext())
            {
                if (!AppointmentId.HasValue)
                {
                    SaveNewAppointment(db);
                }
                else
                {
                    SaveExistingAppointment(db);
                }

                db.SaveChanges();
            }

            Destroy();
        }
コード例 #2
0
        protected void onOkButtonClicked(object sender, EventArgs e)
        {
            if (birdNameEntry.Text.Trim() != "")
            {
                onBirdAddButtonClicked(sender, e);
            }

            using (var db = new BizeeBirdDbContext())
            {
                if (CustomerId.HasValue)
                {
                    UpdateExistingCustomer(db);
                }
                else
                {
                    CreateNewCustomer(db);
                }

                db.SaveChanges();
            }

            Destroy();
        }