public User_Program_Job_Data(User_Program__ControlLogix_System_ owner)
 {
     InitializeComponent();
     this.owner                 = owner;
     this.ShowInTaskbar         = false;
     Run_Button.DialogResult    = DialogResult.Yes;
     Cancel_Button.DialogResult = DialogResult.No;
 }
Exemple #2
0
 public User_Program_Select_Operation(User_Program__ControlLogix_System_ Owner)
 {
     InitializeComponent();
     this.Owner         = Owner;
     this.ShowInTaskbar = false;
     Operation_1_Button.DialogResult = DialogResult.Yes;
     Operation_2_Button.DialogResult = DialogResult.Yes;
     Operation_3_Button.DialogResult = DialogResult.Yes;
 }
Exemple #3
0
 private void Operator_Login()
 {
     if (EmployeeName_TextBox.Text == "" && DMPID_TextBox.Text == "")
     {
         ListBox.Items.Add("Please Enter Your Name and DMP ID to Login");
     }
     else if (EmployeeName_TextBox.Text == "")
     {
         ListBox.Items.Add("Enter Employee Name to Login");
     }
     else if (DMPID_TextBox.Text == "")
     {
         ListBox.Items.Add("Enter DMP ID to Login");
     }
     else if (EmployeeName_TextBox.Text != "" && DMPID_TextBox.Text != "")
     {
         try
         {
             SqlConnection OperatorLogin = new SqlConnection(SQL_Connection);
             SqlCommand    Login_Command = new SqlCommand("Select * from [dbo].[Employee] where EmployeeName=@EmployeeName and DMPID=@DMPID", OperatorLogin);
             Login_Command.Parameters.AddWithValue("@EmployeeName", EmployeeName_TextBox.Text);
             Login_Command.Parameters.AddWithValue("@DMPID", DMPID_TextBox.Text);
             OperatorLogin.Open();
             SqlDataAdapter adapt = new SqlDataAdapter(Login_Command);
             DataSet        ds    = new DataSet();
             adapt.Fill(ds);
             LoginGridView.DataSource = ds.Tables[0];
             OperatorLogin.Close();
             int count = ds.Tables[0].Rows.Count;
             if (count == 1)
             {
                 User_Program__ControlLogix_System_ UserProgram = new User_Program__ControlLogix_System_();
                 UserProgram.User_TextBox.Text  = EmployeeName_TextBox.Text;
                 UserProgram.Clock_TextBox.Text = Clock_TextBox.Text;
                 UserProgram.DMPID_TextBox.Text = DMPID_TextBox.Text;
                 DMPID_TextBox.Clear();
                 EmployeeName_TextBox.Clear();
                 EmployeeName_ComboBox.Text = "";
                 ListBox.Items.Clear();
                 UserProgram.Show();
                 UserProgram.Focus();
                 OpenNewForm();
             }
             else
             {
                 ListBox.Items.Add("Please Check DMP ID Entered");
             }
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
 }
 public User_Program_Schedule(User_Program__ControlLogix_System_ owner)
 {
     InitializeComponent();
     this.owner         = owner;
     this.ShowInTaskbar = false;
 }