Пример #1
0
 public ListBoxPrintBadge(PersonConference obj)
 {
     Model      = obj;
     IsSelected = false;
 }
Пример #2
0
 public ListBoxPrintBadge(PersonConference obj)
 {
     Model = obj;
     IsSelected = false;
 }
Пример #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the PersonConferences EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToPersonConferences(PersonConference personConference)
 {
     base.AddObject("PersonConferences", personConference);
 }
Пример #4
0
        public static string OrderToWord(PersonConference person)
        {
            try
            {
                object missing = System.Reflection.Missing.Value;
                object readOnly = false;
                object isVisible = false;
                object filename = System.AppDomain.CurrentDomain.BaseDirectory.ToString() + "Files\\prix_kass_order.doc";
                object saveAs = @"C:\Orders\Order_" + person.PersonConferences_Payment.OrderNumber + "_" + person.Person.FullName + ".doc";
                var objWord = CreateWordObj();

                objWord.Visible = false;

                var doc = objWord.Documents.Open(ref filename, ref missing, ref readOnly,
                    ref missing, ref missing, ref missing,
                    ref missing, ref missing, ref missing, ref missing, ref missing,
                    ref isVisible, ref missing, ref missing, ref missing, ref missing);

                doc.Activate();
                FindAndReplace(objWord, "$Order$", person.PersonConferences_Payment.OrderNumber.ToString());
                FindAndReplace(objWord, "$Total$", person.PersonConferences_Payment.Money.ToString());
                FindAndReplace(objWord, "$FullName$", person.Person.FullName);
                FindAndReplace(objWord, "$F$", person.Person.FirstName);
                FindAndReplace(objWord, "$IO$", person.Person.SecondName + " " + person.Person.ThirdName);
                FindAndReplace(objWord, "$TotalStr$", RusCurrency.Str((double)person.PersonConferences_Payment.Money));

                doc.SaveAs(ref saveAs, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
                var printerName = DataManager.Instance.GetPrinter("ORDER");
                if (string.IsNullOrEmpty(printerName))
                {
                    doc.PrintOut();
                }
                else
                {
                    objWord.ActivePrinter = printerName;
                    doc.PrintOut();
                }
                objWord.Quit();
                return saveAs.ToString();
            }
            catch (Exception ex)
            {
                LogManager.Write(ex);
                MessageBox.Show(ex.Message);
                return ex.Message;
            }
        }
Пример #5
0
 /// <summary>
 /// Create a new PersonConference object.
 /// </summary>
 /// <param name="personConferenceId">Initial value of the PersonConferenceId property.</param>
 /// <param name="personId">Initial value of the PersonId property.</param>
 /// <param name="conferenceId">Initial value of the ConferenceId property.</param>
 public static PersonConference CreatePersonConference(global::System.Guid personConferenceId, global::System.Guid personId, global::System.Guid conferenceId)
 {
     PersonConference personConference = new PersonConference();
     personConference.PersonConferenceId = personConferenceId;
     personConference.PersonId = personId;
     personConference.ConferenceId = conferenceId;
     return personConference;
 }