Beispiel #1
0
 private void buttonSave_Click(object sender, EventArgs e)
 {
     if (getOut)
     {
         appoint.WeCannotGetIt(database, textBoxIdleReason.Text, User);
     }
     else
     {
         appoint.IdleReason = textBoxIdleReason.Text;
         appoint.Save(database);
     }
     Close();
 }
        private void buttonSave_Click(object sender, EventArgs e)
        {
            appoint.Save(database);

            if (appoint.DateComing != dateTimePickerComing.Value)
            {
                appoint.SetTimeComing(database, dateTimePickerComing.Value, User);
            }

            if (onSaveData != null)
            {
                onSaveData(sender, e);
            }
        }
        private void CreateAppoint()
        {
            Appoint appoint = new Appoint(PlanAppoint);

            appoint.Citizen = (State)cboxCountry.SelectedItem;
            appoint.SetComingDate(pickComingTime.Value);
            appoint.Unit    = (Unit)cboxUnit.SelectedItem;
            appoint.Warrant = tboxWarrant.Text;
            appoint.Trailer = tboxTrailer.Text;

            appoint.Save(Database);

            string          query      = DispatcherService.Resources.Doc.PlanAppoint.LinkToAppoint;
            QueryParameters parameters = new QueryParameters("plan", PlanAppoint.Id);

            parameters.Add("id", appoint.Id);
            Database.ExecuteQuery(query, parameters);


            FindForm().Close();
        }