private void tbtcalculo_Click(object sender, EventArgs e) { DateTime del, al, pago; FrmPlanillaMensual2 plm = FrmPlanillaMensual2.Getinstancia(); this.AddOwnedForm(plm); this.toolmenu.Visible = false; this.btncerrar.Enabled = false; PlanillaCache.p_idplanilla = Convert.ToInt32(dgvplanilla.CurrentRow.Cells[0].Value); PlanillaCache.p_idmes = Convert.ToInt32(dgvplanilla.CurrentRow.Cells[2].Value); plm.Lblperiodo.Text = (dgvplanilla.CurrentRow.Cells[1].Value.ToString() + " - " + dgvplanilla.CurrentRow.Cells[4].Value.ToString()); del = Convert.ToDateTime(dgvplanilla.CurrentRow.Cells[5].Value); plm.TxtfechaInicio.Text = del.ToString("dd,MM,yyyy"); al = Convert.ToDateTime(dgvplanilla.CurrentRow.Cells[6].Value); plm.TxtfechaFin.Text = al.ToString("dd,MM,yyyy"); pago = Convert.ToDateTime(dgvplanilla.CurrentRow.Cells[7].Value); plm.Txtpago.Text = pago.ToString("dd,MM,yyyy"); plm.txtdiasMes.Text = dgvplanilla.CurrentRow.Cells[8].Value.ToString(); plm.txtid_tipoplanilla.Text = dgvplanilla.CurrentRow.Cells[11].Value.ToString().Trim(); plm.lbltipoplanilla.Text = dgvplanilla.CurrentRow.Cells[12].Value.ToString(); plm.FormBorderStyle = FormBorderStyle.None; plm.TopLevel = false;//como ventana nivel superior plm.Dock = DockStyle.Fill; this.Controls.Add(plm); this.Tag = plm;//datos sobre el control plm.BringToFront(); //f_vist.StartPosition = FormStartPosition.CenterParent; plm.Show(); }
//ENVIAR DIAS SUBSIDIOS private void SentDayinDatagri(dynamic negativo, dynamic positivo, bool val) { FrmPlanillaMensual2 frpla2 = (FrmPlanillaMensual2)Owner; if (val) { frpla2.Dgvplanilla1.CurrentRow.Cells[negativo].Value = lbltotalSp.Text; } frpla2.Dgvplanilla1.CurrentRow.Cells[positivo].Value = subtotal_si; frpla2.xdia_subposi = Convert.ToInt32(lbltotalSi.Text); frpla2.Dgvplanilla1.CurrentRow.Cells["dgvdia_vaca"].Value = Convert.ToInt32(lblvacaciones.Text); }