/// <summary> /// Constructor para inicializar atributos y elementos del formulario /// </summary> public Formula_Form() { try { InitializeComponent(); formulateBl = new FormulateBL(Program.ContextData); typeFormulateBl = new TypeFormulateBL(Program.ContextData); FormulateBS.DataSource = formulateBl.GetFormulates(); pn_listado.Show(); pn_crear.Hide(); pn_editar.Hide(); criterioCbx.SelectedIndex = 0; this.Width = pn_listado.Width; this.Height = pn_listado.Height; this.CenterToScreen(); TipoFormulaBS.DataSource = typeFormulateBl.GetTypeFormulates(); } catch (Exception ex) { Error_Form errorForm = new Error_Form(ex.Message); errorForm.MdiParent = ParentForm; errorForm.Show(); } }
public Crear_Proyecto_Form() { try { InitializeComponent(); this.ControlBox = false; criterioCbx.SelectedIndex = 0; newProject = new PROYECTO(); confianzaTextBox.Text = "95"; limiteInfTxt.Text = "0,1"; areaFustalesTxt.Text = "1"; factorFormaTxt.Text = "0,65"; areaMuestrearTxt.Text = "0"; numeroParcelasMuestraTxt.Text = "0"; numeroParcelasTxt.Text = "0"; AreaTotalTxt.Text = "0"; tamParcelaTxt.Text = "0"; formulate = new FormulateBL(Program.ContextData); formulaBS.DataSource = formulate.GetFormulates(); newProject.NROFORMULA = formulaBS.Count != 0 ? ((FORMULA)formulaBS.Current).NROFORMULA : Guid.Empty; project = new ProjectBL(Program.ContextData); estratoDGW.Columns[2].DefaultCellStyle.Format = "0.000##"; typeExample = new TypeSampleDesignBl(Program.ContextData); objetiveInventory = new ObjectiveInventoryBL(Program.ContextData); stratum = new StratumBL(Program.ContextData); species = new SpeciesBL(Program.ContextData); costBL = new CostBL(Program.ContextData); objetivoInventarioBS.DataSource = objetiveInventory.GetObjectiveInventories(); newProject.NOMBRETIPOINV = objetivoInventarioBS.Count != 0 ? ((OBJETIVOINVENTARIO)objetivoInventarioBS.Current).NOMBRETIPOINV : null; tipoDisenoBS.DataSource = typeExample.GetTypeSampleDesignList(); newProject.NOMTIPODISEMUEST = tipoDisenoBS.Count != 0 ? ((TIPODISENOMUESTRAL)tipoDisenoBS.Current).NOMTIPODISEMUEST : null; estratoBS.DataSource = stratum.GetStratums(); estratoDGW.DataSource = estratoBS; especieBS.DataSource = species.GetSpecies(); especiesDGW.DataSource = especieBS; proyectoBS.DataSource = project.GetProjectsFree(null); proyectoDGW.DataSource = proyectoBS; costoBS.DataSource = costBL.GetCosts(); costoDGW.DataSource = costoBS; listProjectsByStage = new List<PROYECTOSPORETAPA>(); tipoDisenoCbx.SelectedValue = "SI"; TipoProyectoCbx.SelectedIndex = 0; nuevoProyectoBS.DataSource = newProject; foreach (Control ctl in crearProyectoTab.TabPages["costosTabP"].Controls) ctl.Enabled = true; } catch (Exception ex) { Error_Form errorForm = new Error_Form(ex.Message); errorForm.MdiParent = ParentForm; errorForm.Show(); } }
public Evaluador_Expresiones_Form() { InitializeComponent(); variable = new VariableBL(Program.ContextData); formulas = new FormulateBL(Program.ContextData); tipoFormulas = new TypeFormulateBL(Program.ContextData); variableBS.DataSource = variable.GetVariables(); tipoFormulaBS.DataSource = tipoFormulas.GetTypeFormulates(); AP.InitOperations(AleExpressionParser.OPERATIONS_CLIKESET); AP.IgnoreCase = chkIgnoreCase.Checked; Variables = new Dictionary<string, object>(AP.IgnoreCase ? StringComparer.CurrentCultureIgnoreCase : StringComparer.CurrentCulture); Variables.Add("S", "AleExpressionParser 1.0 beta"); }
public Actualizar_Proyectos_Form() { try { InitializeComponent(); this.ControlBox = false; project = new ProjectBL(Program.ContextData); typeExample = new TypeSampleDesignBl(Program.ContextData); objetiveInventory = new ObjectiveInventoryBL(Program.ContextData); stratum = new StratumBL(Program.ContextData); species = new SpeciesBL(Program.ContextData); form = new FormBL(Program.ContextData); formulateBL = new FormulateBL(Program.ContextData); costBL = new CostBL(Program.ContextData); PROYECTO p = (PROYECTO)Program.Cache.Get("project"); proyectoBS.DataSource = p; proyectosBS.DataSource = project.GetProjects(p); proyectoDGW.DataSource = proyectosBS; objetivoInventarioBS.DataSource = objetiveInventory.GetObjectiveInventories(); tipoObjetivoCbx.DataSource = objetivoInventarioBS; List<KeyValuePair<string, string>> data = new List<KeyValuePair<string, string>>(); data.Add(new KeyValuePair<string, string>("IN", "Independiente")); data.Add(new KeyValuePair<string, string>("CR", "Contenedor")); TipoProyectoCbx.DataSource = data; TipoProyectoCbx.DisplayMember = "Value"; TipoProyectoCbx.ValueMember = "Key"; TipoProyectoCbx.SelectedValue = p.TIPOPROYECTO; criterioCbx.SelectedIndex = 0; tipoDisenoBS.DataSource = typeExample.GetTypeSampleDesignList(); tipoDisenoCbx.DataSource = tipoDisenoBS; especieBS.DataSource = species.GetSpecies(); especiesDGW.DataSource = especieBS; formulariosBS.DataSource = p.FORMULARIO; formulariosDGW.DataSource = formulariosBS; costoBS.DataSource = costBL.GetCosts(); costoDGW.DataSource = costoBS; //formulaBS.DataSource = formulateBL.GetFormulates(); //formularComboBox.DataSource = formulaBS; formularComboBox.DataSource = formulateBL.GetFormulates(); formularComboBox.SelectedValue = p.NROFORMULA; //formularComboBox.SelectedItem = p.FORMULA; expresionTxt.Text = p.FORMULA.EXPRESION; estratoBS.DataSource = stratum.GetStratums(); estratoDGW.DataSource = estratoBS; numeroEtapasTxt.Text = p.ETAPA.ToString(); confianzaTxt.Text = p.CONFIANZA.ToString(); tamParcelaTxt.Text = p.TAMANO.ToString(); numeroParcelasTxt.Text = p.NUMEROPARCELAS.ToString(); numeroParcelasMuestraTxt.Text = p.NUMEROPARCELASAMUESTREAR.ToString(); limiteInfTxt.Text = p.LIMITINFDAP.ToString(); intMuestreoTxt.Text = p.INTMUE.ToString(); AreaTotalTxt.Text = p.SUPTOT.ToString(); areaMuestrearTxt.Text = p.SUPMUE.ToString(); areaFustalesTxt.Text = p.AREAFUSTALESPORPARCELA.ToString(); factorFormaTxt.Text = p.FACTORDEFORMA.ToString(); this.modificate = false; } catch (Exception ex) { Error_Form errorForm = new Error_Form(ex.Message); errorForm.MdiParent = ParentForm; errorForm.Show(); } }