コード例 #1
0
        private void GuardarDetalleConfiguracion()
        {
            MetrolabItem oDetalle = new MetrolabItem();

            oDetalle.IdMetrolab = txtOrden.Text.Trim();
            oDetalle.IdItem     = int.Parse(ddlItem.SelectedValue);
            oDetalle.Habilitado = true;
            oDetalle.Save();
        }
コード例 #2
0
        protected void chkStatus_OnCheckedChanged(object sender, EventArgs e)
        {
            CheckBox    chkStatus = (CheckBox)sender;
            GridViewRow row       = (GridViewRow)chkStatus.NamingContainer;

            int i_id = int.Parse(gvLista.DataKeys[row.RowIndex].Value.ToString());

            MetrolabItem oRegistro = new MetrolabItem();

            oRegistro            = (MetrolabItem)oRegistro.Get(typeof(MetrolabItem), i_id);
            oRegistro.Habilitado = chkStatus.Checked;
            oRegistro.Save();
        }