Example #1
0
        private void buttonX1_Click(object sender, EventArgs e)
        {
            using (Profit_RGEntities context = new Profit_RGEntities())
            {
                if ((MessageBox.Show(this, "Desea confirmar la entrada del Equipo?", Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes))
                {
                    Int32 i = 0;
                    foreach (DataGridViewRow item in grdentradaPCP.Rows)
                    {
                        //grdSalida.Rows[i].Cells[7].Value.ToString() == "S"
                        // (grdSalida[7, i].Value.ToString() == "S")
                        if (item.Cells[5].Value != null)

                        {
                            string a = Convert.ToString(item.Cells["Confirm"].Value);
                            if (a == "T")
                            {
                                context.pConfirmarFecha_pcp_entrada(Convert.ToInt32(grdentradaPCP.Rows[i].Cells[0].Value));
                                grdentradaPCP.DataSource = "";
                                CargarEntradas();
                            }
                            // grdSalida.DataSource = "";
                            // CargarSalidas();
                        }
                        i++;
                    }
                    grdentradaPCP.DataSource = "";
                    CargarEntradas();
                }
                else
                {
                    DialogResult = DialogResult.None;
                }
            }
        }