Ejemplo n.º 1
0
        public void Actualizar(LectoraBE oLectoraBE)
        {
            dbConnectionMySql oDB = new dbConnectionMySql();

            MySqlParameter[] sqlParameters = new MySqlParameter[4];
            sqlParameters[0] = new MySqlParameter("?p_val_desc", oLectoraBE.val_desc);
            sqlParameters[1] = new MySqlParameter("?p_proy_oid_proy", oLectoraBE.proy_oid_proy);
            sqlParameters[2] = new MySqlParameter("?p_clie_oid_clie", oLectoraBE.clie_oid_clie);
            sqlParameters[3] = new MySqlParameter("?p_come_oid_come", oLectoraBE.come_oid_come_aten);
            sqlParameters[4] = new MySqlParameter("?p_ind_acti", oLectoraBE.ind_acti);

            oDB.EjecutarDML_SP("sp_Lectora_Upd", sqlParameters);
        }
Ejemplo n.º 2
0
        public LectoraBE obtenerLectoraByOid(int oid)
        {
            LectoraBE oBE = new LectoraBE();

            DataTable dt = new DataTable();

            LectoraDAO oLectoraDAO = new LectoraDAO();

            dt = oLectoraDAO.obtenerLectoraByOid(oid);

            foreach (DataRow dr in dt.Rows)
            {
                oBE.oid_lect           = Int32.Parse(dr["oid_lect"].ToString());
                oBE.val_desc           = dr["val_desc"].ToString();
                oBE.proy_oid_proy      = Int32.Parse(dr["proy_oid_proy"].ToString());
                oBE.clie_oid_clie      = Int32.Parse(dr["clie_oid_clie"].ToString());
                oBE.come_oid_come_aten = Int32.Parse(dr["come_oid_come_aten"].ToString());
                oBE.ind_acti           = Int32.Parse(dr["ind_acti"].ToString());
            }

            return(oBE);
        }
Ejemplo n.º 3
0
        private void btnGrabar_Click(object sender, EventArgs e)
        {
            LectoraBE oBE = new LectoraBE();
            LectoraBR oBR = new LectoraBR();

            oBE.val_desc = txtDescripcion.Text;

            oBE.proy_oid_proy = Global.oid_proy;

            DataRowView rvCome = cboComedor.SelectedItem as DataRowView;

            oBE.come_oid_come_aten = Int32.Parse(rvCome["Codigo"].ToString());

            if ((cboEstado.SelectedItem as ComboBoxItem).Value.ToString() == "1")
            {
                oBE.ind_acti = 1;
            }
            else
            {
                oBE.ind_acti = 0;
            };

            if (mod == "C")
            {
                oBR.Insertar(oBE);
            }
            else
            {
                oBE.oid_lect = Int32.Parse(txtOid.Text);
                oBR.Actualizar(oBE);
            }


            oFrm.CargarDGV();

            this.Close();
        }
Ejemplo n.º 4
0
        public void Actualizar(LectoraBE oLectoraBE)
        {
            LectoraDAO oLectoraDAO = new LectoraDAO();

            oLectoraDAO.Actualizar(oLectoraBE);
        }
Ejemplo n.º 5
0
        public void Insertar(LectoraBE oLectoraBE)
        {
            LectoraDAO oLectoraDAO = new LectoraDAO();

            oLectoraDAO.Insertar(oLectoraBE);
        }