protected AbstractValidation(DbConnection conn, string sql, string arguments, string description, ValidateLevel level) { Sql = sql; Arguments = arguments; Connection = conn; Description = description; Level = level; }
private MessageType GetMessageType(ValidateLevel validateLevel) { switch (validateLevel) { default: case ValidateLevel.Warning: return(MessageType.Warning); case ValidateLevel.Error: return(MessageType.Error); } }
private Validation GetValidation(Validation.Types type, string arguments, string sql, string description, ValidateLevel level) { switch (type) { case Validation.Types.Equal: { return(new EqualValidation { Arguments = arguments, Sql = sql, Description = description, Level = level }); } case Validation.Types.Range: { return(new RangeValidation { Arguments = arguments, Sql = sql, Description = description, Level = level }); } } throw new SpiderExceptoin($"Unsported validation type: {type}"); }
public RangeValidation(DbConnection conn, string sql, string arguments, string description, ValidateLevel level = ValidateLevel.Error) : base(conn, sql, arguments, description, level) { }
public ValidateAttribute(string method, ValidateLevel level) { this.method = method; this.level = level; }
public EqualValidation(DbConnection conn, string sql, string arguments, string description, ValidateLevel level = ValidateLevel.Error) : base(conn, sql, arguments, description, level) { }
private void AsignLevel() { if ( ! this.InvokeRequired ) { this.ControlsEnabled( false ); this.btnLogin.Enabled = false; //switch ( this._log.UserLevel ) //{ // case 0: // this.tableTiles.Enabled = false; // this.panelTitles.Enabled = false; // this.cboPeriodos.Visible = false; // this.lblBranchAddress.Visible = false; // this.lblPeriodo.Visible = false; // this.ptbLogo.Visible = false; // this.lblNameInstitution.Text = "Administrador General"; // this.panelLogged.Enabled = true; // this.lblNameInstitution.Location = new Point(570, 3); // this.cboBranches.Location = new Point( 718, 42 ); // this.cboBranches.Visible = true; // this.cboBranches.Text = "Seleccione una Sucursal"; // this.lblSucursal.Location = new Point( 632, 47 ); // this.lblSucursal.Visible = true; // this.tsmItemPeriodos.Visible = false; // //this.tsmItemReportes.Visible = false; // this.tsmItemRegisterAlumno.Enabled = false; // this.menuOptions.Enabled = true; // this.menuOptions.Visible = true; // break; //} } else { ValidateLevel tipo = new ValidateLevel( AsignLevel ); this.Invoke( tipo, new object[] { } ); } }