private void comedorTipoServicioStripMenuItem1_Click(object sender, EventArgs e) { FrmComedorTipoServicio oFrmComedorTipoServicios = new FrmComedorTipoServicio(); oFrmComedorTipoServicios.MdiParent = this; oFrmComedorTipoServicios.Show(); }
/* * public FrmComedorTipoServicioAdd(FrmComedorTipoServicio p_oFrm): this() * { * this.oFrm = p_oFrm; * txtOid.Visible = false; * * txtOid.ReadOnly = false; * txtDescripcion.ReadOnly = false; * * this.mod = "C"; * } */ public FrmComedorTipoServicioAdd(FrmComedorTipoServicio p_oFrm, int p_oid, string mod) : this() { this.oFrm = p_oFrm; this.oid = p_oid; this.mod = mod; CHelper oCHelper = new CHelper(); oCHelper.FormatearFormularioMantenimientoAdd(this); txtProyecto.Text = Global.des_proy; DataTable dt = new DataTable(); ComedorAtencionBR oComedorAtencionBR = new ComedorAtencionBR(); dt = oComedorAtencionBR.ObtenerListadoPorProyecto(Global.oid_proy); cboComedor.DataSource = dt; cboComedor.DisplayMember = "Descripcion"; TipoServicioComedorBR oBRTipoServicioComedor = new TipoServicioComedorBR(); DataTable dt2 = new DataTable(); dt2 = oBRTipoServicioComedor.ObtenerListadoCombo(); cboTipoServicio.DataSource = dt2; cboTipoServicio.DisplayMember = "Descripcion"; CargarComboEstado(); switch (this.mod) { case "C": txtOid.Visible = true; txtOid.ReadOnly = true; break; case "U": txtOid.Visible = true; txtOid.ReadOnly = true; break; case "R": txtOid.Visible = true; txtOid.ReadOnly = true; break; } }