asp.net图书借阅管理系统(毕业设计)


本系统应实现图书分类管理功能、图书基本信息管理功能、图书入库管理功能、图书盘点管理功能、借阅证件类型管理功能、借阅证件管理功能、图书借阅管理功能、用户管理功能等。
资源截图
代码片段和文件信息
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text.Regularexpressions;
using System.Text;
/// 
/// Common 的摘要说明
/// 

public class Common
{
public Common()
{
//
// TODO: 在此处添加构造函数逻辑
//
}

    #region SHA1加密函数
    public static string SHA1(string source)   
    {   
        return FormsAuthentication.HashPasswordForStoringInConfigFile(source “SHA1“);   
    } 
    #endregion

    #region SQL防蛀函数
    public static string UrnHtml(string strHtml)
    {
        strHtml = strHtml.Replace(“‘“ “'“).Replace(“.“ “.“).Replace(“%“ “%“).Replace(“-“ “-“).Replace(“<“ “ “);
        return strHtml;
    }
    #endregion

    #region 过滤字符串中所有的html标签
    public static string checkStr(string text)
    {
        text = text.Trim();
        if (string.IsNullOrEmpty(text))
            return string.Empty;
        text = Regex.Replace(text “[\s]{2}“ “ “); //两个或多个空格替换为一个
        text = Regex.Replace(text “(<[b|B][r|R]/*>)+|(<[p|P](.|\n)*?>)“ “
“); //

        text = Regex.Replace(text “(\s*&[n|N][b|B][s|S][p|P];\s*)+“ “ “); // 
        text = Regex.Replace(text “<(.|\n)*?>“ string.Empty); //其它任何标记
        text = text.Replace(“‘“ “‘‘“);
        return text;
    }//过滤字符串中所有的标签代码,如 


    #endregion

    #region 字符串截取函数
    public static string subString(string str int length)
    {
        string tmpStr = str;
        int strLength = length;
        if (str.Length > strLength)
        {
            tmpStr = str.Substring(0 strLength);

        }
        return tmpStr;
    }//截取从字符串开始位置到指定位置的字符
    #endregion

    #region 截取字符串函数

    #region 截取字符串函数
    /// 
    /// 截取字符串函数
    /// 

    /// 所要截取的字符串
    /// 截取字符串的长度(0则不判断)
    /// 
    public static string GetSubString(object str int num)
    {
        return GetSubString(str.ToString() num);
    }
    #endregion

    /// 
    /// 截取字符串函数
    /// 

    /// 所要截取的字符串
    /// 截取字符串的长度(0则不判断)
    /// 后缀字符(如:..)
    /// 
    public static string GetSubString(string str int num string laststr)
    {
        //if (num > 0)
        //{
        //    return (RemoveHTML(str).Length > num) ? (RemoveHTML(str).Substring(0 num)) : str;
        //}
        //else
        //{
        //    return str;
        //}

        if (Encoding.UTF8.GetByteCount(str) <= num * 2)
        {
            return str;
        }
        ASCIIEncoding ascii = new ASCIIEncoding();
        int tempLen = 0;
        string tempString = ““;
        byte[] s = ascii.GetBytes(

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     989950  2012-04-24 18:47  扬州职业大学图书借阅管理系统录像.exe

----------- ---------  ---------- -----  ----

               989950                    1


版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)