Example #1
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            JobCard jobcard = new JobCard((int)(System.Convert.ChangeType(TxtOrderId.Text, typeof(int))), (int)(System.Convert.ChangeType(SalesLine.Text, typeof(int))));

            jobcard.Text = this.Text;
            jobcard.Show();
        }
Example #2
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            //messageBox.Show("Please select sales Line", e.ColumnIndex.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Warning);
            JobIDtxt.Text = dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString();
            if (JobIDtxt.Text == "")
            {
                MessageBox.Show("Please select sales Line", JobIDtxt.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                if (e.ColumnIndex == 0)
                {
                    JobCard jobcard = new JobCard(Int32.Parse(JobIDtxt.Text), Int32.Parse(SalesLine.Text));
                    jobcard.Text = this.Text;
                    jobcard.Show();
                }
                else if (e.ColumnIndex > 0 && e.ColumnIndex < 2)
                {
                    ExoJobOrder salesline = new ExoJobOrder(Int32.Parse(JobIDtxt.Text));
                    salesline.Show();
                    salesline.GrantAccess(this.Text);
                }
                else

                {
                    this.Validate();
                    this.pRODJOBCARDBindingSource.EndEdit();
                    this.pROD_JOBCARDTableAdapter.Update(this.mESDataSet.PROD_JOBCARD);
                }
            }
        }