コード例 #1
0
        private void ClearUIControls()
        {
            if (insertMode || CurrentPublication.EstadoPublicacion.Descripcion == "Borrador")
            {
                CboEstadoPublicacion.SelectedIndex = 0;
                CboTipoPublicacion.SelectedIndex   = 0;
                CboVisibilidad.SelectedIndex       = 0;
                ChkRecibirPreguntas.Checked        = false;
                TxtValorInicioSubasta.Text         = string.Empty;
                TxtDescripcion.Text = string.Empty;
                TxtPrecio.Text      = string.Empty;
                TxtStock.Text       = string.Empty;

                if (LstRubro.CheckedIndices != null)
                {
                    foreach (var checkedIndex in LstRubro.CheckedIndices)
                    {
                        LstRubro.SetItemCheckState((int)checkedIndex, CheckState.Unchecked);
                    }
                }
            }
            else
            {
                if (CurrentPublication.TipoPublicacion.Descripcion != "Subasta")
                {
                    TxtDescripcion.Text = string.Empty;
                    TxtStock.Text       = string.Empty;
                    CboEstadoPublicacion.SelectedIndex = 0;
                }
            }
        }
コード例 #2
0
        private void LblLimpiar_Click(object sender, EventArgs e)
        {
            TxtDescripcion.Text = string.Empty;
            //Borro todos los rubros checkeados
            foreach (var checkedIndex in LstRubro.CheckedIndices)
            {
                LstRubro.SetItemCheckState((int)checkedIndex, CheckState.Unchecked);
            }

            RefreshSources(null);
        }