Exemplo n.º 1
0
 private void btnTransfer_Click(object sender, EventArgs e)
 {
     try
     {
         string       CheckBoxString = dgvHR.Columns["Select"].Name;
         string       Key            = dgvHR.Columns["ORGANIZATION_ID"].Name;
         CopyGridView copyGrid       = new CopyGridView();
         copyGrid.CopyDataGridViewComplexible(dgvHR, dgvQLTS, CheckBoxString, Key);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 2
0
        private void btnTransfer_Click(object sender, EventArgs e)
        {
            CopyGridView copyGrid = new CopyGridView();

            copyGrid.CopyDataGridView(dgvQuerry, dgvSelected);
        }
Exemplo n.º 3
0
        private void btnChoose_Click(object sender, EventArgs e)
        {
            try
            {
                if (rdrYesUse.Checked == true)
                {
                    CopyGridView copyGrid = new CopyGridView();
                    copyGrid.copyDataGridViewNotDelete(dgvAddOutDevice, dgvListDevice);

                    dgvListDevice.Columns.Add("Ma_TS_Repair", "Vật tư cần sửa chữa");

                    foreach (DataGridViewRow row in dgvRepairDevice.Rows)
                    {
                        Boolean CheckRow = Convert.ToBoolean(row.Cells["Select"].Value);
                        if (CheckRow)
                        {
                            string MTS = row.Cells["Ma_TS"].Value.ToString();
                            foreach (DataGridViewRow row2 in dgvListDevice.Rows)
                            {
                                row2.Cells["Ma_TS_Repair"].Value = MTS;
                            }
                        }
                    }


                    AntiDuplicated antiDuplicated = new AntiDuplicated();
                    antiDuplicated.AntiColumnDuplicate(dgvListDevice);

                    string ColumnName = dgvAddOutDevice.Columns["Select"].Name.ToString();
                    AutoComplete.AutoUnselectAll(dgvAddOutDevice, ColumnName);

                    foreach (DataGridViewRow row in dgvRepairDevice.Rows)
                    {
                        Boolean CheckRow = Convert.ToBoolean(row.Cells["Select"].Value);
                        if (CheckRow)
                        {
                            int n = row.Index;
                            dgvRepairDevice.Rows.RemoveAt(n);
                        }
                    }


                    btnFinalTransfer_Click(this, new EventArgs());
                }
                else if (rdrNoUse.Checked == true)
                {
                    CopyGridView copyGrid = new CopyGridView();
                    copyGrid.CopyDataGridView(dgvRepairDevice, dgvListDevice);

                    foreach (DataGridViewRow row in dgvRepairDevice.Rows)
                    {
                        Boolean CheckRow = Convert.ToBoolean(row.Cells["Select"].Value);
                        if (CheckRow)
                        {
                            int n = row.Index;
                            dgvRepairDevice.Rows.RemoveAt(n);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 4
0
        private void btnTransfer_Click(object sender, EventArgs e)
        {
            CopyGridView copyGrid = new CopyGridView();

            copyGrid.CopyDataGridView(dgvAddingDevice, dgvAddOutDevice);
        }
Exemplo n.º 5
0
        private void button1_Click(object sender, EventArgs e)
        {
            CopyGridView copy = new CopyGridView();

            copy.CopyDataGridView(dgvQuerry, dgvSelected);
        }