コード例 #1
0
 private void checkEdit2_Click(object sender, EventArgs e)
 {
     if (!checkEdit2.Checked)
     {
         GridViewLoad.SelectAll();
     }
     if (checkEdit2.Checked)
     {
         GridViewLoad.ClearSelection();
     }
 }
コード例 #2
0
 private void gridView1_CustomDrawRowIndicator(object sender, RowIndicatorCustomDrawEventArgs e)
 {
     if (e.Info.IsRowIndicator)
     {
         if (GridViewLoad.IsRowSelected(e.RowHandle))
         {
             e.Info.Paint.DrawCheckBox(e.Graphics, e.Bounds, ButtonState.Checked);
             e.Handled = true;
         }
         else
         {
             e.Info.Paint.DrawCheckBox(e.Graphics, e.Bounds, ButtonState.Normal);
             e.Handled = true;
         }
     }
 }
コード例 #3
0
 private void PurgeButton_Click(object sender, EventArgs e)
 {
     if (GridViewLoad.SelectedRowsCount == 0)
     {
         MessageBox.Show("Please select at least one row before attempting to purge records.");
         return;
     }
     if (MessageBox.Show("Are you sure you want to purge the selected ratesheets ?", "CONFIRM", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         List <int> values = new List <int>();
         foreach (int val in GridViewLoad.GetSelectedRows())
         {
             values.Add((int)GridViewLoad.GetRowCellValue(val, "ID"));
         }
         foreach (int ID in values)
         {
             CPRATES rec = (from hratRec in context.CPRATES where hratRec.ID == ID select hratRec).FirstOrDefault();
             context.CPRATES.DeleteObject(rec);
             context.SaveChanges();
         }
     }
 }
コード例 #4
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            //preview
            int j = GridViewCopy.DataRowCount + 1;

            for (int i = 0; i < j; i++)
            {
                GridViewCopy.MoveFirst();
                GridViewCopy.DeleteRow(GridViewCopy.FocusedRowHandle);
            }


            foreach (int val in GridViewLoad.GetSelectedRows())
            {
                GridViewCopy.AddNewRow();
                GridViewCopy.SetFocusedRowCellValue("CODE", ImageComboBoxEditCopyCode.EditValue);
                GridViewCopy.SetFocusedRowCellValue("AGENCY", GridViewLoad.GetRowCellValue(val, "AGENCY"));
                GridViewCopy.SetFocusedRowCellValue("CAT", GridViewLoad.GetRowCellValue(val, "CAT"));
                GridViewCopy.SetFocusedRowCellValue("START_DATE", GridViewLoad.GetRowCellValue(val, "START_DATE"));
                GridViewCopy.SetFocusedRowCellValue("END_DATE", GridViewLoad.GetRowCellValue(val, "END_DATE"));
                GridViewCopy.SetFocusedRowCellValue("YEAR", GridViewLoad.GetRowCellValue(val, "YEAR"));
                GridViewCopy.SetFocusedRowCellValue("H_L", GridViewLoad.GetRowCellValue(val, "H_L"));
                GridViewCopy.SetFocusedRowCellValue("ID", GridViewLoad.GetRowCellValue(val, "ID"));
                GridViewCopy.SetFocusedRowCellValue("ResDate_Start", GridViewLoad.GetRowCellValue(val, "ResDate_Start"));
                GridViewCopy.SetFocusedRowCellValue("ResDate_End", GridViewLoad.GetRowCellValue(val, "ResDate_End"));
                GridViewCopy.SetFocusedRowCellValue("Inactive", GridViewLoad.GetRowCellValue(val, "Inactive"));
                GridViewCopy.SetFocusedRowCellValue("Time", GridViewLoad.GetRowCellValue(val, "Time"));
                GridViewCopy.SetFocusedRowCellValue("DESC", GridViewLoad.GetRowCellValue(val, "DESC"));
                GridViewCopy.SetFocusedRowCellValue("LAST_UPD", DateTime.Now);
                GridViewCopy.SetFocusedRowCellValue("UPD_INIT", username);
                GridViewCopy.SetFocusedRowCellValue("PP1", GridViewLoad.GetRowCellValue(val, "PP1"));
                GridViewCopy.SetFocusedRowCellValue("PP2", GridViewLoad.GetRowCellValue(val, "PP2"));
                GridViewCopy.SetFocusedRowCellValue("PP3", GridViewLoad.GetRowCellValue(val, "PP3"));
                GridViewCopy.SetFocusedRowCellValue("PP4", GridViewLoad.GetRowCellValue(val, "PP4"));
                GridViewCopy.SetFocusedRowCellValue("PP5", GridViewLoad.GetRowCellValue(val, "PP5"));
                GridViewCopy.SetFocusedRowCellValue("PP6", GridViewLoad.GetRowCellValue(val, "PP6"));
                GridViewCopy.SetFocusedRowCellValue("PP7", GridViewLoad.GetRowCellValue(val, "PP7"));
                GridViewCopy.SetFocusedRowCellValue("PP8", GridViewLoad.GetRowCellValue(val, "PP8"));
                GridViewCopy.SetFocusedRowCellValue("PP9", GridViewLoad.GetRowCellValue(val, "PP9"));
                GridViewCopy.SetFocusedRowCellValue("PP10", GridViewLoad.GetRowCellValue(val, "PP10"));
                GridViewCopy.SetFocusedRowCellValue("GPP1", GridViewLoad.GetRowCellValue(val, "GPP1"));
                GridViewCopy.SetFocusedRowCellValue("GPP2", GridViewLoad.GetRowCellValue(val, "GPP2"));
                GridViewCopy.SetFocusedRowCellValue("GPP3", GridViewLoad.GetRowCellValue(val, "GPP3"));
                GridViewCopy.SetFocusedRowCellValue("GPP4", GridViewLoad.GetRowCellValue(val, "GPP4"));
                GridViewCopy.SetFocusedRowCellValue("GPP5", GridViewLoad.GetRowCellValue(val, "GPP5"));
                GridViewCopy.SetFocusedRowCellValue("GPP6", GridViewLoad.GetRowCellValue(val, "GPP6"));
                GridViewCopy.SetFocusedRowCellValue("GPP7", GridViewLoad.GetRowCellValue(val, "GPP7"));
                GridViewCopy.SetFocusedRowCellValue("GPP8", GridViewLoad.GetRowCellValue(val, "GPP8"));
                GridViewCopy.SetFocusedRowCellValue("GPP9", GridViewLoad.GetRowCellValue(val, "GPP9"));
                GridViewCopy.SetFocusedRowCellValue("GPP10", GridViewLoad.GetRowCellValue(val, "GPP10"));
                GridViewCopy.SetFocusedRowCellValue("NPP1", GridViewLoad.GetRowCellValue(val, "NPP1"));
                GridViewCopy.SetFocusedRowCellValue("NPP2", GridViewLoad.GetRowCellValue(val, "NPP2"));
                GridViewCopy.SetFocusedRowCellValue("NPP3", GridViewLoad.GetRowCellValue(val, "NPP3"));
                GridViewCopy.SetFocusedRowCellValue("NPP4", GridViewLoad.GetRowCellValue(val, "NPP4"));
                GridViewCopy.SetFocusedRowCellValue("NPP5", GridViewLoad.GetRowCellValue(val, "NPP5"));
                GridViewCopy.SetFocusedRowCellValue("NPP6", GridViewLoad.GetRowCellValue(val, "NPP6"));
                GridViewCopy.SetFocusedRowCellValue("NPP7", GridViewLoad.GetRowCellValue(val, "NPP7"));
                GridViewCopy.SetFocusedRowCellValue("NPP8", GridViewLoad.GetRowCellValue(val, "NPP8"));
                GridViewCopy.SetFocusedRowCellValue("NPP9", GridViewLoad.GetRowCellValue(val, "NPP9"));
                GridViewCopy.SetFocusedRowCellValue("NPP10", GridViewLoad.GetRowCellValue(val, "NPP10"));
                GridViewCopy.SetFocusedRowCellValue("CHD_GRATE", GridViewLoad.GetRowCellValue(val, "CHD_GRATE"));
                GridViewCopy.SetFocusedRowCellValue("CHD_NRATE", GridViewLoad.GetRowCellValue(val, "CHD_NRATE"));
                GridViewCopy.SetFocusedRowCellValue("CHD_LIMIT", GridViewLoad.GetRowCellValue(val, "CHD_LIMIT"));
                GridViewCopy.SetFocusedRowCellValue("JR_LIMIT", GridViewLoad.GetRowCellValue(val, "JR_LIMIT"));
                GridViewCopy.SetFocusedRowCellValue("JR_GRATE", GridViewLoad.GetRowCellValue(val, "JR_GRATE"));
                GridViewCopy.SetFocusedRowCellValue("JR_NRATE", GridViewLoad.GetRowCellValue(val, "JR_NRATE"));
                GridViewCopy.SetFocusedRowCellValue("COMM_FLG", GridViewLoad.GetRowCellValue(val, "COMM_FLG"));
                GridViewCopy.SetFocusedRowCellValue("COMM_PCT", GridViewLoad.GetRowCellValue(val, "COMM_PCT"));
                GridViewCopy.SetFocusedRowCellValue("Transport_Type", GridViewLoad.GetRowCellValue(val, "Transport_Type"));
                GridViewCopy.SetFocusedRowCellValue("Vendor_Code", GridViewLoad.GetRowCellValue(val, "Vendor_Code"));
                GridViewCopy.SetFocusedRowCellValue("Unit_Rate", GridViewLoad.GetRowCellValue(val, "Unit_Rate"));
                GridViewCopy.SetFocusedRowCellValue("Inhouse", GridViewLoad.GetRowCellValue(val, "Inhouse"));
                GridViewCopy.SetFocusedRowCellValue("Vendor_Code_Jr", GridViewLoad.GetRowCellValue(val, "Vendor_Code_Jr"));
                GridViewCopy.SetFocusedRowCellValue("Vendor_Code_Chd", GridViewLoad.GetRowCellValue(val, "Vendor_Code_Chd"));
                GridViewCopy.SetFocusedRowCellValue("SpecialValue_Code", GridViewLoad.GetRowCellValue(val, "SpecialValue_Code"));
                GridViewCopy.SetFocusedRowCellValue("Currency_CodeSheet", GridViewLoad.GetRowCellValue(val, "Currency_CodeSheet"));
                GridViewCopy.SetFocusedRowCellValue("Currency_CodePayment", GridViewLoad.GetRowCellValue(val, "Currency_CodePayment"));
                GridViewCopy.SetFocusedRowCellValue("ExchangeRate", GridViewLoad.GetRowCellValue(val, "ExchangeRate"));
                GridViewCopy.SetFocusedRowCellValue("BusTourDays", GridViewLoad.GetRowCellValue(val, "BusTourDays"));
                GridViewCopy.SetFocusedRowCellValue("BusTourStops", GridViewLoad.GetRowCellValue(val, "BusTourStops"));
                GridViewCopy.SetFocusedRowCellValue("Comp_Type", GridViewLoad.GetRowCellValue(val, "Comp_Type"));
                GridViewCopy.SetFocusedRowCellValue("SeniorAgeLimit", GridViewLoad.GetRowCellValue(val, "SeniorAgeLimit"));
                GridViewCopy.SetFocusedRowCellValue("SeniorCost", GridViewLoad.GetRowCellValue(val, "SeniorCost"));
                GridViewCopy.SetFocusedRowCellValue("SeniorGross", GridViewLoad.GetRowCellValue(val, "SeniorGross"));
                GridViewCopy.SetFocusedRowCellValue("SeniorRetail", GridViewLoad.GetRowCellValue(val, "SeniorRetail"));
                GridViewCopy.SetFocusedRowCellValue("Retail1", GridViewLoad.GetRowCellValue(val, "Retail1"));
                GridViewCopy.SetFocusedRowCellValue("Retail2", GridViewLoad.GetRowCellValue(val, "Retail2"));
                GridViewCopy.SetFocusedRowCellValue("Retail3", GridViewLoad.GetRowCellValue(val, "Retail3"));
                GridViewCopy.SetFocusedRowCellValue("Retail4", GridViewLoad.GetRowCellValue(val, "Retail4"));
                GridViewCopy.SetFocusedRowCellValue("Retail5", GridViewLoad.GetRowCellValue(val, "Retail5"));
                GridViewCopy.SetFocusedRowCellValue("Retail6", GridViewLoad.GetRowCellValue(val, "Retail6"));
                GridViewCopy.SetFocusedRowCellValue("Retail7", GridViewLoad.GetRowCellValue(val, "Retail7"));
                GridViewCopy.SetFocusedRowCellValue("Retail8", GridViewLoad.GetRowCellValue(val, "Retail8"));
                GridViewCopy.SetFocusedRowCellValue("Retail9", GridViewLoad.GetRowCellValue(val, "Retail9"));
                GridViewCopy.SetFocusedRowCellValue("Retail10", GridViewLoad.GetRowCellValue(val, "Retail10"));
                GridViewCopy.SetFocusedRowCellValue("Retail10", GridViewLoad.GetRowCellValue(val, "Retail10"));
                GridViewCopy.SetFocusedRowCellValue("ChildRetail", GridViewLoad.GetRowCellValue(val, "ChildRetail"));
                GridViewCopy.SetFocusedRowCellValue("JuniorRetail", GridViewLoad.GetRowCellValue(val, "JuniorRetail"));
            }
            GridViewCopy.Focus();
            GridViewLoad.Focus();
            if (checkEdit1.Checked)
            {
                if (MessageBox.Show("Are you sure you want to delete the original records?", "CONFIRM", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    GridViewLoad.DeleteSelectedRows();
                    context.SaveChanges();
                }
            }
        }
コード例 #5
0
 private void gridView1_SelectionChanged(object sender, DevExpress.Data.SelectionChangedEventArgs e)
 {
     GridViewLoad.InvalidateRowIndicator(e.ControllerRow);
 }
コード例 #6
0
        private void simpleButton1_Click_1(object sender, System.EventArgs e)
        {
            int j = GridViewCopy.DataRowCount + 1;

            for (int i = 0; i < j; i++)
            {
                GridViewCopy.MoveFirst();
                GridViewCopy.DeleteRow(GridViewCopy.FocusedRowHandle);
            }

            foreach (int val in GridViewLoad.GetSelectedRows())
            {
                GridViewCopy.AddNewRow();
                GridViewCopy.SetFocusedRowCellValue("CODE", ImageComboBoxEditCopyCode.EditValue);
                GridViewCopy.SetFocusedRowCellValue("ID", GridViewLoad.GetRowCellValue(val, "ID"));
                GridViewCopy.SetFocusedRowCellValue("CAT", GridViewLoad.GetRowCellValue(val, "CAT"));
                GridViewCopy.SetFocusedRowCellValue("H_L", GridViewLoad.GetRowCellValue(val, "H_L"));
                GridViewCopy.SetFocusedRowCellValue("YEAR", GridViewLoad.GetRowCellValue(val, "YEAR"));
                GridViewCopy.SetFocusedRowCellValue("HCODE", GridViewLoad.GetRowCellValue(val, "HCODE"));
                GridViewCopy.SetFocusedRowCellValue("LAST_UPD", DateTime.Now);
                GridViewCopy.SetFocusedRowCellValue("UPD_INIT", username);
                GridViewCopy.SetFocusedRowCellValue("START_DATE", GridViewLoad.GetRowCellValue(val, "START_DATE"));
                GridViewCopy.SetFocusedRowCellValue("END_DATE", GridViewLoad.GetRowCellValue(val, "END_DATE"));
                GridViewCopy.SetFocusedRowCellValue("DESC", GridViewLoad.GetRowCellValue(val, "DESC"));

                GridViewCopy.SetFocusedRowCellValue("SGL_GRATE", GridViewLoad.GetRowCellValue(val, "SGL_GRATE"));
                GridViewCopy.SetFocusedRowCellValue("SGL_NRATE", GridViewLoad.GetRowCellValue(val, "SGL_NRATE"));
                GridViewCopy.SetFocusedRowCellValue("EXG_SGL", GridViewLoad.GetRowCellValue(val, "EXG_SGL"));
                GridViewCopy.SetFocusedRowCellValue("EXN_SGL", GridViewLoad.GetRowCellValue(val, "EXN_SGL"));

                GridViewCopy.SetFocusedRowCellValue("DBL_GRATE", GridViewLoad.GetRowCellValue(val, "DBL_GRATE"));
                GridViewCopy.SetFocusedRowCellValue("DBL_NRATE", GridViewLoad.GetRowCellValue(val, "DBL_NRATE"));
                GridViewCopy.SetFocusedRowCellValue("EXG_DBL", GridViewLoad.GetRowCellValue(val, "EXG_DBL"));
                GridViewCopy.SetFocusedRowCellValue("EXN_DBL", GridViewLoad.GetRowCellValue(val, "EXN_DBL"));

                GridViewCopy.SetFocusedRowCellValue("TPL_GRATE", GridViewLoad.GetRowCellValue(val, "TPL_GRATE"));
                GridViewCopy.SetFocusedRowCellValue("TPL_NRATE", GridViewLoad.GetRowCellValue(val, "TPL_NRATE"));
                GridViewCopy.SetFocusedRowCellValue("EXG_TPL", GridViewLoad.GetRowCellValue(val, "EXG_TPL"));
                GridViewCopy.SetFocusedRowCellValue("EXN_TPL", GridViewLoad.GetRowCellValue(val, "EXN_TPL"));

                GridViewCopy.SetFocusedRowCellValue("QUA_GRATE", GridViewLoad.GetRowCellValue(val, "QUA_GRATE"));
                GridViewCopy.SetFocusedRowCellValue("QUA_NRATE", GridViewLoad.GetRowCellValue(val, "QUA_NRATE"));
                GridViewCopy.SetFocusedRowCellValue("EXG_QUA", GridViewLoad.GetRowCellValue(val, "EXG_QUA"));
                GridViewCopy.SetFocusedRowCellValue("EXN_QUA", GridViewLoad.GetRowCellValue(val, "EXN_QUA"));

                GridViewCopy.SetFocusedRowCellValue("OTH_GRATE", GridViewLoad.GetRowCellValue(val, "OTH_GRATE"));
                GridViewCopy.SetFocusedRowCellValue("OTH_NRATE", GridViewLoad.GetRowCellValue(val, "OTH_NRATE"));
                GridViewCopy.SetFocusedRowCellValue("EXG_OTH", GridViewLoad.GetRowCellValue(val, "EXG_OTH"));
                GridViewCopy.SetFocusedRowCellValue("EXN_OTH", GridViewLoad.GetRowCellValue(val, "EXN_OTH"));

                GridViewCopy.SetFocusedRowCellValue("CHD_GRATE", GridViewLoad.GetRowCellValue(val, "CHD_GRATE"));
                GridViewCopy.SetFocusedRowCellValue("CHD_NRATE", GridViewLoad.GetRowCellValue(val, "CHD_NRATE"));
                GridViewCopy.SetFocusedRowCellValue("EXG_CHD", GridViewLoad.GetRowCellValue(val, "EXG_CHD"));
                GridViewCopy.SetFocusedRowCellValue("EXN_CHD", GridViewLoad.GetRowCellValue(val, "EXN_CHD"));
                GridViewCopy.SetFocusedRowCellValue("CHD_LIMIT", GridViewLoad.GetRowCellValue(val, "CHD_LIMIT"));

                GridViewCopy.SetFocusedRowCellValue("JR_LIMIT", GridViewLoad.GetRowCellValue(val, "JR_LIMIT"));
                GridViewCopy.SetFocusedRowCellValue("JR_GRATE", GridViewLoad.GetRowCellValue(val, "JR_GRATE"));
                GridViewCopy.SetFocusedRowCellValue("JR_NRATE", GridViewLoad.GetRowCellValue(val, "JR_NRATE"));
                GridViewCopy.SetFocusedRowCellValue("EXG_JR", GridViewLoad.GetRowCellValue(val, "EXG_JR"));
                GridViewCopy.SetFocusedRowCellValue("EXN_JR", GridViewLoad.GetRowCellValue(val, "EXN_JR"));

                GridViewCopy.SetFocusedRowCellValue("MEAL1_CODE", GridViewLoad.GetRowCellValue(val, "MEAL1_CODE"));
                GridViewCopy.SetFocusedRowCellValue("MEAL2_CODE", GridViewLoad.GetRowCellValue(val, "MEAL2_CODE"));
                GridViewCopy.SetFocusedRowCellValue("MEAL3_CODE", GridViewLoad.GetRowCellValue(val, "MEAL3_CODE"));
                GridViewCopy.SetFocusedRowCellValue("MEAL4_CODE", GridViewLoad.GetRowCellValue(val, "MEAL4_CODE"));
                GridViewCopy.SetFocusedRowCellValue("MEAL5_CODE", GridViewLoad.GetRowCellValue(val, "MEAL5_CODE"));
                GridViewCopy.SetFocusedRowCellValue("MEAL1_ADG", GridViewLoad.GetRowCellValue(val, "MEAL1_ADG"));
                GridViewCopy.SetFocusedRowCellValue("MEAL2_ADG", GridViewLoad.GetRowCellValue(val, "MEAL2_ADG"));
                GridViewCopy.SetFocusedRowCellValue("MEAL3_ADG", GridViewLoad.GetRowCellValue(val, "MEAL3_ADG"));
                GridViewCopy.SetFocusedRowCellValue("MEAL4_ADG", GridViewLoad.GetRowCellValue(val, "MEAL4_ADG"));
                GridViewCopy.SetFocusedRowCellValue("MEAL5_ADG", GridViewLoad.GetRowCellValue(val, "MEAL5_ADG"));
                GridViewCopy.SetFocusedRowCellValue("MEAL1_ADN", GridViewLoad.GetRowCellValue(val, "MEAL1_ADN"));
                GridViewCopy.SetFocusedRowCellValue("MEAL2_ADN", GridViewLoad.GetRowCellValue(val, "MEAL2_ADN"));
                GridViewCopy.SetFocusedRowCellValue("MEAL3_ADN", GridViewLoad.GetRowCellValue(val, "MEAL3_ADN"));
                GridViewCopy.SetFocusedRowCellValue("MEAL4_ADN", GridViewLoad.GetRowCellValue(val, "MEAL4_ADN"));
                GridViewCopy.SetFocusedRowCellValue("MEAL5_ADN", GridViewLoad.GetRowCellValue(val, "MEAL5_ADN"));

                GridViewCopy.SetFocusedRowCellValue("COMMENT1", GridViewLoad.GetRowCellValue(val, "COMMENT1"));
                GridViewCopy.SetFocusedRowCellValue("COMMENT2", GridViewLoad.GetRowCellValue(val, "COMMENT2"));
                GridViewCopy.SetFocusedRowCellValue("AGENCY", GridViewLoad.GetRowCellValue(val, "AGENCY"));

                GridViewCopy.SetFocusedRowCellValue("COMM_FLG", GridViewLoad.GetRowCellValue(val, "COMM_FLG"));
                GridViewCopy.SetFocusedRowCellValue("COMM_PCT", GridViewLoad.GetRowCellValue(val, "COMM_PCT"));

                GridViewCopy.SetFocusedRowCellValue("MAX_SGL", GridViewLoad.GetRowCellValue(val, "MAX_SGL"));
                GridViewCopy.SetFocusedRowCellValue("MAX_DBL", GridViewLoad.GetRowCellValue(val, "MAX_DBL"));
                GridViewCopy.SetFocusedRowCellValue("MAX_TPL", GridViewLoad.GetRowCellValue(val, "MAX_TPL"));
                GridViewCopy.SetFocusedRowCellValue("MAX_QUA", GridViewLoad.GetRowCellValue(val, "MAX_QUA"));
                GridViewCopy.SetFocusedRowCellValue("MAX_OTH", GridViewLoad.GetRowCellValue(val, "MAX_OTH"));
                GridViewCopy.SetFocusedRowCellValue("Inhouse", GridViewLoad.GetRowCellValue(val, "Inhouse"));
                GridViewCopy.SetFocusedRowCellValue("Inactive", GridViewLoad.GetRowCellValue(val, "Inactive"));
                GridViewCopy.SetFocusedRowCellValue("ResDate_Start", GridViewLoad.GetRowCellValue(val, "ResDate_Start"));
                GridViewCopy.SetFocusedRowCellValue("ResDate_End", GridViewLoad.GetRowCellValue(val, "ResDate_End"));

                GridViewCopy.SetFocusedRowCellValue("SpecialValue_Code", GridViewLoad.GetRowCellValue(val, "SpecialValue_Code"));
                GridViewCopy.SetFocusedRowCellValue("Currency_CodeSheet", GridViewLoad.GetRowCellValue(val, "Currency_CodeSheet"));
                GridViewCopy.SetFocusedRowCellValue("Currency_CodePayment", GridViewLoad.GetRowCellValue(val, "Currency_CodePayment"));
                GridViewCopy.SetFocusedRowCellValue("ExchangeRate", GridViewLoad.GetRowCellValue(val, "ExchangeRate"));

                GridViewCopy.SetFocusedRowCellValue("PRatesPlan_Day1", GridViewLoad.GetRowCellValue(val, "PRatesPlan_Day1"));
                GridViewCopy.SetFocusedRowCellValue("PRatesPlan_Day2", GridViewLoad.GetRowCellValue(val, "PRatesPlan_Day2"));
                GridViewCopy.SetFocusedRowCellValue("PRatesPlan_Day3", GridViewLoad.GetRowCellValue(val, "PRatesPlan_Day3"));
                GridViewCopy.SetFocusedRowCellValue("PRatesPlan_Day4", GridViewLoad.GetRowCellValue(val, "PRatesPlan_Day4"));
                GridViewCopy.SetFocusedRowCellValue("PRatesPlan_Day5", GridViewLoad.GetRowCellValue(val, "PRatesPlan_Day5"));
                GridViewCopy.SetFocusedRowCellValue("PRatesPlan_Day6", GridViewLoad.GetRowCellValue(val, "PRatesPlan_Day6"));
                GridViewCopy.SetFocusedRowCellValue("PRatesPlan_Day7", GridViewLoad.GetRowCellValue(val, "PRatesPlan_Day7"));
            }
            GridViewCopy.Focus();
            GridViewLoad.Focus();
            if (checkEdit1.Checked)
            {
                if (MessageBox.Show("Are you sure you want to delete the original records?", "CONFIRM", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    GridViewLoad.DeleteSelectedRows();
                    context.SaveChanges();
                }
            }
        }