private void checkSession()
 {
     if (!ValidatorFuncs.IsNotEmpty(Convert.ToString(Session[strBackendSession])))
     {
         Response.Write("<script>alert('登入逾時,請重新登入。');location.href='login.aspx';</script>");
         Response.End();
     }
 }
Beispiel #2
0
    /// <summary>
    /// 產生 SQL Statement
    /// </summary>
    /// <returns></returns>
    public override PetaPoco.Sql SQLStatement()
    {
        if (ValidatorFuncs.IsValidDate((string)_viewState[_startDateID])) // 起始日期
        {
            SQL.Append(string.Format(" AND {0} >= @0", _datetimeFieldName), _viewState[_startDateID].ToString());
        }

        if (ValidatorFuncs.IsValidDate((string)_viewState[_endDateID])) // 結束日期
        {
            SQL.Append(string.Format(" AND {0} < DateAdd(d, 1, @0)", _datetimeFieldName), _viewState[_endDateID].ToString());
        }

        return(SQL);
    }
 private void TextBox_PreviewTextInput(object sender, TextCompositionEventArgs e)
 {
     e.Handled = !ValidatorFuncs.TextIsMetronomeSpeed(e.Text);
 }
Beispiel #4
0
 protected override bool IsValid(PropertyValidatorContext context)
 {
     return(ValidatorFuncs.IsChinese((string)context.PropertyValue));
 }