Пример #1
0
        private void comedoresToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmComedor oFrmComedor = new FrmComedor();

            oFrmComedor.MdiParent = this;
            oFrmComedor.Show();
        }
        /*
         * public FrmComedorAdd(FrmComedor p_oFrm): this()
         * {
         *  this.oFrm = p_oFrm;
         *  txtOid.Visible = false;
         *
         *  txtOid.ReadOnly = false;
         *  txtDescripcion.ReadOnly = false;
         *
         *  this.mod = "C";
         * }
         */

        public FrmComedorAdd(FrmComedor 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);

            CargarComboEstado();

            switch (this.mod)
            {
            case "C":

                //txtOid.Visible = true;

                //txtOid.ReadOnly = true;
                txtDescripcion.ReadOnly = false;

                txtProyecto.Text = Global.des_proy;

                break;

            case "U":

                //txtOid.Visible = true;

                txtOid.ReadOnly         = true;
                txtDescripcion.ReadOnly = false;

                txtProyecto.Text = Global.des_proy;

                break;


            case "R":

                txtOid.Visible = true;

                txtOid.ReadOnly         = true;
                txtDescripcion.ReadOnly = true;
                break;
            }
        }