Example #1
0
 private void a()
 {
     //remarks
     //Left button - add vacancy and filling "R"-table
     //Right button -"Hired"
     if (CurrentUser.type == 2)
     {
         AddJob a = new AddJob();
         //Позиция на экране
         a.Left    = (this.Left) + (this.Width - a.Width) / 2;
         a.Top     = (this.Top) + (this.Height - a.Height) / 2;
         a.NewR1   = new R1();
         a.ID.Text = ((from v in vacs select v.Idvacant).Max() + 1).ToString();
         if (a.ID.Text == "")
         {
             a.ID.Text = "1";
         }
         a.ORG.Text    = CurrentUser.name;
         a.SALARY.Text = this.TBSalary.Text;
         a.Show();
     }
     else
     {
         MessageBox.Show("Только компании могут публиковать вакансии.");
     }
 }
Example #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.MainWindow1 = ((kurscachWPF.AddJob)(target));
                return;

            case 2:
                this.MainBorder = ((System.Windows.Controls.Border)(target));
                return;

            case 3:

            #line 36 "..\..\AddJob.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_2);

            #line default
            #line hidden
                return;

            case 4:

            #line 51 "..\..\AddJob.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_3);

            #line default
            #line hidden
                return;

            case 5:
                this.ID = ((System.Windows.Controls.TextBox)(target));
                return;

            case 6:
                this.ORG = ((System.Windows.Controls.TextBox)(target));
                return;

            case 7:
                this.SALARY = ((System.Windows.Controls.TextBox)(target));
                return;

            case 8:
                this.POSITION = ((System.Windows.Controls.ComboBox)(target));
                return;
            }
            this._contentLoaded = true;
        }