コード例 #1
0
        //button 7 => Add button
        private void button7_Click(object sender, EventArgs e)
        {
            if (jaye == 1)
            {
                p_process pro = new p_process();
                pro.Visible  = true;
                this.Visible = false;
            }
            else if (jaye == 2)
            {
                p_details prd = new p_details();
                prd.Visible  = true;
                this.Visible = false;
            }


            else
            {
            }
        }
コード例 #2
0
        //update product details

        private void update_button_Click(object sender, EventArgs e)
        {
            if (jaye == 2)
            {
                p_details upt = new p_details();
                upt.Visible = true;
                upt.p_save_button.Visible = false;

                upt.p_pid_txt.Text            = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
                upt.p_cat_com.Text            = this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
                upt.p_size_com.Text           = this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
                upt.p_colour_txt.Text         = this.dataGridView1.CurrentRow.Cells[3].Value.ToString();
                upt.p_uprice_txt.Text         = this.dataGridView1.CurrentRow.Cells[4].Value.ToString();
                upt.p_quality_rating_com.Text = this.dataGridView1.CurrentRow.Cells[5].Value.ToString();
                upt.richTextBox1.Text         = this.dataGridView1.CurrentRow.Cells[6].Value.ToString();
                this.Dispose();
                //upt.Show();
            }

            //update product process
            else if (jaye == 1)
            {
                p_process upt = new p_process();
                upt.Visible            = true;
                upt.add_button.Visible = false;

                upt.pp_proid.Text          = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
                upt.details_secID_txt.Text = this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
                upt.pp_in.Text             = this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
                upt.pp_out.Text            = this.dataGridView1.CurrentRow.Cells[3].Value.ToString();
                upt.pp_pendquntity.Text    = this.dataGridView1.CurrentRow.Cells[4].Value.ToString();
                upt.pp_quality_com.Text    = this.dataGridView1.CurrentRow.Cells[5].Value.ToString();

                this.Dispose();
                //upt.Show();
            }

            //update order details
            else if (jaye == 3)
            {
                order_details upt = new order_details();
                upt.Visible = true;

                upt.order_id_label.Text       = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
                upt.order_size_label.Text     = this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
                upt.order_colour_label.Text   = this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
                upt.order_design_label.Text   = this.dataGridView1.CurrentRow.Cells[3].Value.ToString();
                upt.order_quantity_label.Text = this.dataGridView1.CurrentRow.Cells[4].Value.ToString();
                upt.oredr_date_label.Text     = this.dataGridView1.CurrentRow.Cells[5].Value.ToString();
                upt.order_duedate_label.Text  = this.dataGridView1.CurrentRow.Cells[6].Value.ToString();
                upt.order_status_com.Text     = this.dataGridView1.CurrentRow.Cells[7].Value.ToString();
                //upt.dateTimePicker1.Text = this.dataGridView1.CurrentRow.Cells[8].Value.ToString();

                this.Dispose();
            }

            else if (jaye == 5)
            {
                rejected upt = new rejected();
                upt.Visible = true;

                upt.reject_pID_label.Text  = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
                upt.r_category_label.Text  = this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
                upt.r_alloction_label.Text = this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
                upt.r_uprice_label.Text    = this.dataGridView1.CurrentRow.Cells[3].Value.ToString();
                upt.r_sales_quality.Text   = this.dataGridView1.CurrentRow.Cells[4].Value.ToString();
                upt.r_listBox.Text         = this.dataGridView1.CurrentRow.Cells[5].Value.ToString();
                upt.r_date_label.Text      = this.dataGridView1.CurrentRow.Cells[6].Value.ToString();
                upt.r_sales_month.Text     = this.dataGridView1.CurrentRow.Cells[7].Value.ToString();

                this.Dispose();
            }

            else
            {
            }
        }