Пример #1
0
 public DataSet LoadInfo()
 {
     string sql = "select * from [column] order by columnID asc";
     Database db = new Database();
     DataSet ds = db.GetDataSet(sql);
     return ds;
 }
Пример #2
0
 public DataRow GetRow(int docID)
 {
     string sql = "select *  from attach where docID=" + SQLString.GetQuotedString(Convert.ToString(docID));
     Database db = new Database();
     DataRow dr = db.GetDataRow(sql);
     return dr;
 }
Пример #3
0
 public bool Update(Hashtable userInfo, string Xwhere)
 {
     Database db = new Database();
     if (db.Update("[admin]", userInfo, Xwhere))
     {
         return true;
     }
     return false;
 }
Пример #4
0
 public bool Addcolumn(Hashtable userInfo)
 {
     Database db = new Database();
     if (db.Insert("[column]", userInfo))
     {
         return true;
     }
     return false;
 }
Пример #5
0
 public void LoadInfo(string adminID)
 {
     string sql = "select * from admin where adminID=" + SQLString.GetQuotedString(adminID);
     Database db = new Database();
     DataRow dr = db.GetDataRow(sql);
     if (dr != null)
     {
         this._adminID = GetSafeData.ValidateDataRow_S(dr, "adminID");
         this._adminPwd = GetSafeData.ValidateDataRow_S(dr, "adminPwd");
     }
 }
Пример #6
0
        public int Login(string adminID, string adminPwd)
        {
            string sql = "select * from admin where adminID=" + SQLString.GetQuotedString(adminID);
            Database db = new Database();
            SqlDataReader sdr = db.GetDataReader(sql);
            if (sdr.Read())
            {
                if (sdr["adminPwd"].ToString() == adminPwd)
                {
                    return 1;
                }
                else
                    return -1;

            }
            return 0;
        }
Пример #7
0
 public void Delete(int docID)
 {
     string sql = "delete from assess where docID=" + SQLString.GetQuotedString(Convert.ToString(docID));
     Database db = new Database();
     db.ExecuteSQL(sql);
 }
Пример #8
0
 public void AsignExp(Hashtable ht)
 {
     Database db = new Database();
     db.Insert("[assess]", ht);
 }
Пример #9
0
 public bool Update_Column(string editor, string column)
 {
     string sql = "update editor set editorColumn=" + SQLString.GetQuotedString(column) + "where editorID=" + SQLString.GetQuotedString(editor);
     Database db = new Database();
     if (db.ExecuteSQL(sql) > 0)
     {
         return true;
     }
     return false;
 }
Пример #10
0
 //上传返修稿件后更改状态
 public void Update_attach(int docID, string state)
 {
     string sql = "update document set docState=" + SQLString.GetQuotedString(state) + "where docID=" + SQLString.GetQuotedString(Convert.ToString(docID));
     Database db = new Database();
     db.ExecuteSQL(sql);
 }
Пример #11
0
 public void LoadInfo(string authorID)
 {
     string sql="select * from author where authorID="+SQLString .GetQuotedString (authorID);
     Database db = new Database();
     DataRow dr = db.GetDataRow(sql);
     if (dr != null)
     {
         this._authorID = GetSafeData.ValidateDataRow_S(dr, "authorID");
         this._authorPwd = GetSafeData.ValidateDataRow_S(dr, "authorPwd");
         this._authorName = GetSafeData.ValidateDataRow_S(dr, "authorName");
         this._authorSex = GetSafeData.ValidateDataRow_S(dr, "authorSex");
         this._authorBirth = GetSafeData.ValidateDataRow_S(dr, "authorBirth");
         this._authorRegion = GetSafeData.ValidateDataRow_S(dr, "authorRegion");
         this._authorPost = GetSafeData.ValidateDataRow_S(dr, "authorPost");
         this._authorMail = GetSafeData.ValidateDataRow_S(dr, "authorMail");
         this._authorDegree = GetSafeData.ValidateDataRow_S(dr, "authorDegree");
         this._authorMajor = GetSafeData.ValidateDataRow_S(dr, "authorMajor");
         this._authorTitle = GetSafeData.ValidateDataRow_S(dr, "authorTitle");
         this._authorJob = GetSafeData.ValidateDataRow_S(dr, "authorJob");
         this._authorCompany = GetSafeData.ValidateDataRow_S(dr, "authorCompany");
         this._authorPhone = GetSafeData.ValidateDataRow_S(dr, "authorPhone");
         this._authorAddress = GetSafeData.ValidateDataRow_S(dr, "authorAddress");
         this._authorInfo = GetSafeData.ValidateDataRow_S(dr, "authorInfo");
         this._exist = true;
     }
     else
     {
         this._exist = false;
     }
 }
Пример #12
0
 public bool Delete(string ID)
 {
     string sql = "delete from [author] where authorID=" + SQLString.GetQuotedString(ID);
     Database db = new Database();
     if (db.ExecuteSQL(sql)>0)
     {
         return true;
     }
     return false;
 }
Пример #13
0
 public bool Add(Hashtable userInfo)
 {
     Database db = new Database();
     if (db.Insert("[author]", userInfo))
     {
         return true;
     }
     return false;
 }
Пример #14
0
 public void Adduser(Hashtable userInfo)
 {
     Database db = new Database();
     db.Insert("[editor]", userInfo);
 }
Пример #15
0
        //主编加载稿件版面信息
        public DataSet Asign_board(string title, string author)
        {
            string sql = "select document.docID,document.docTitle,document.authorID,board.boardRank,board.boardMoney,board.boardState from document,board where document.docID=board.docID";
            if (title != "")
            {
                sql += " and docTitle like '%" + title + "%'";

            }
            if (author != "")
            {
                sql += " and authorID like '%" + author + "%'";

            }

            Database db = new Database();
            DataSet ds = db.GetDataSet(sql);
            return ds;
        }
Пример #16
0
 public void Add(Hashtable ht)
 {
     Database db = new Database();
     db.Insert("[board]", ht);
 }
Пример #17
0
 //更新稿件版面信息
 public bool Update_board(int ID,string rank,string money,string state)
 {
     string sql = "update board set boardRank=" + SQLString.GetQuotedString(rank) + ",boardMoney=" + SQLString.GetQuotedString(money) + ",boardState=" + SQLString.GetQuotedString(state) + "where docID=" + SQLString.GetQuotedString(Convert.ToString(ID));
     Database db = new Database();
     if (db.ExecuteSQL(sql) > 0)
     {
         return true;
     }
     return false;
 }
Пример #18
0
 //作者加载稿件版面信息
 public DataSet Load_board(string author)
 {
     string sql = "select document.docID,document.docTitle,document.authorID,board.boardRank,board.boardMoney,board.boardState from document,board where document.docID=board.docID and document.authorID=" + SQLString.GetQuotedString(author);
     Database db = new Database();
     DataSet ds = db.GetDataSet(sql);
     return ds;
 }
Пример #19
0
 //查看专家审稿意见
 public DataRow viewassess(string expert, int docID)
 {
     string sql = "select assessment from assess where docID=" + SQLString.GetQuotedString(Convert.ToString(docID)) + "and expertID=" + SQLString.GetQuotedString(expert);
     Database db = new Database();
     DataRow dr = db.GetDataRow(sql);
     return dr;
 }
Пример #20
0
 public DataSet Loadassess(int docID)
 {
     string sql = "select assess.*,expert.expertName,expert.expertID from assess,expert where assess.expertID=expert.expertID and assess.docID=" + SQLString.GetQuotedString(Convert.ToString(docID));
     Database db = new Database();
     DataSet ds = db.GetDataSet(sql);
     return ds;
 }
Пример #21
0
 public bool Update(Hashtable ht, string Xwhere)
 {
     Database db = new Database();
     if (db.Update("[assess]", ht, Xwhere))
     {
         return true;
     }
     return false;
 }
Пример #22
0
 public bool Delete(string editor)
 {
     string sql = "delete from editor where editorID=" + SQLString.GetQuotedString(editor);
     Database db = new Database();
     if (db.ExecuteSQL(sql)>0)
     {
         return true;
     }
     else
     {
         return false;
     }
 }
Пример #23
0
 public bool CheckUser(string authorID)
 {
     string sql = "select * from author where authorID=" + SQLString.GetQuotedString(authorID);
     Database db = new Database();
     DataRow dr = db.GetDataRow(sql);
     if (dr != null)
     {
         return false;
     }
     return true;
 }
Пример #24
0
 public void LoadInfo(string editorID)
 {
     string sql = "select * from editor where editorID=" + SQLString.GetQuotedString(editorID);
     Database db = new Database();
     DataRow dr = db.GetDataRow(sql);
     if (dr != null)
     {
         this._editorID = GetSafeData.ValidateDataRow_S(dr, "editorID");
         this._editorPwd = GetSafeData.ValidateDataRow_S(dr, "editorPwd");
         this._editorName = GetSafeData.ValidateDataRow_S(dr, "editorName");
         this._editorSex = GetSafeData.ValidateDataRow_S(dr, "editorSex");
         this._editorColumn = GetSafeData.ValidateDataRow_S(dr, "editorColumn");
         this._editorPhone = GetSafeData.ValidateDataRow_S(dr, "editorPhone");
         this._editorMail = GetSafeData.ValidateDataRow_S(dr, "editorMail");
         this._editorAddress = GetSafeData.ValidateDataRow_S(dr, "editorAddress");
         this._editorInfo = GetSafeData.ValidateDataRow_S(dr, "editorInfo");
     }
 }
Пример #25
0
 public DataSet Loadauthor(string userID)
 {
     string sql = "select * from author where 1=1";
     if (userID.Trim() != "")
     {
         sql += "and authorID like '%" + userID + "%'";
     }
     Database db = new Database();
     DataSet ds = db.GetDataSet(sql);
     return ds;
 }
Пример #26
0
 //加载作者返修稿件
 public DataSet LoadRepairdoc(string author)
 {
     string sql = " SELECT [document].docID, [document].docTime, [document].docTitle, [document].docReason, state.stateText FROM document,state where [document].docState = state.stateID and docState like " + SQLString.GetQuotedString("_2") + "and authorID=" + SQLString.GetQuotedString(author);
     Database db = new Database();
     DataSet ds = db.GetDataSet(sql);
     return ds;
 }
Пример #27
0
        public int Login(string editorID, string editorPwd)
        {
            string sql = "select * from editor where editorID=" + SQLString.GetQuotedString(editorID);
            Database db = new Database();
            SqlDataReader sdr = db.GetDataReader(sql);
            if (sdr.Read())
            {
                if (sdr["editorPwd"].ToString() == editorPwd)
                {
                    return 1;
                }
                else
                    return -1;

            }
            return 0;
        }
Пример #28
0
 //更新稿件信息
 public bool Update(Hashtable document, string Xwhere)
 {
     Database db = new Database();
     if (db.Update("[document]", document, Xwhere))
     {
         return true;
     }
     return false;
 }
Пример #29
0
        public DataSet LoadInfo(string ID, string column, string Name)
        {
            string sql = "SELECT editor.editorID, editor.editorName, editor.editorPhone, editor.editorMail, editor.editorColumn, [column].columnName FROM [editor],[column] where[column].columnID = editor.editorColumn";
            if (ID != "")
            {
                sql += " and editorID like '%" + ID + "%'";

            }

            if (column != "")
            {
                sql += " and editorColumn like '%" + column + "%'";

            }
            if (Name != "")
            {
                sql += " and editorName like '%" + Name + "%'";

            }

            Database db = new Database();
            DataSet ds = db.GetDataSet(sql);
            return ds;
        }
Пример #30
0
        //获取最后投稿的稿件编号
        public int GetID(string authorID)
        {
            int ID;
            string sql = "select docID from document where  authorID=" + SQLString.GetQuotedString(authorID) + "order by docTime desc";
            Database db = new Database();
            SqlDataReader sdr = db.GetDataReader(sql);
            if (sdr.Read())
            {
                ID = sdr.GetInt32(0);
                return ID;

            }
            return -1;
        }