Exemple #1
0
        /// <summary>
        /// 根據cUserID、iGroupID和cGroupClassify取出使用者資料
        /// </summary>
        /// <param name="cUserID"></param>
        /// <param name="iGroupID"></param>
        /// <param name="cGroupClassify"></param>
        /// <returns></returns>
        public static DataTable ORCS_GroupMember_SELECT_by_UserID_GroupID_Classify(object cUserID, object iGroupID, object cGroupClassify)
        {
            clsORCSDB ORCSDB        = new clsORCSDB();
            DataTable dtGroupMember = new DataTable();
            string    strAthority   = AllSystemUserUtil.GetAuthourityByUserID(cUserID.ToString());
            string    strTableName  = GetTableNameByGroupClassify(cGroupClassify.ToString(), strAthority);
            string    strSQL        = "SELECT * FROM " + strTableName + " WHERE cUserID LIKE '" + cUserID + "' AND iGroupID LIKE '" + iGroupID + "'";

            dtGroupMember = ORCSDB.GetDataSet(strSQL).Tables[0];
            return(dtGroupMember);
        }
Exemple #2
0
        /// <summary>
        /// 根據UserID、GroupID和GroupClassify刪除群組使用者
        /// </summary>
        /// <param name="cUserID"></param>
        /// <param name="iGroupID"></param>
        /// <param name="cGroupClassify"></param>
        /// <returns></returns>
        public static int ORCS_GroupMember_DELETE_by_UserID_GroupID_Classify(object cUserID, object iGroupID, object cGroupClassify)
        {
            string    strAthority  = AllSystemUserUtil.GetAuthourityByUserID(cUserID.ToString());
            string    strTableName = GetTableNameByGroupClassify(cGroupClassify.ToString(), strAthority);
            clsORCSDB ORCSDB       = new clsORCSDB();
            string    strSQL       = "DELETE " + strTableName + " WHERE cUserID LIKE '" + cUserID + "' AND iGroupID LIKE '" + iGroupID + "'";

            try
            {
                ORCSDB.ExecuteNonQuery(strSQL);
            }
            catch
            {
                return(-1);
            }
            return(0);
        }
Exemple #3
0
        /// <summary>
        /// 在群組資料表存入資料
        /// </summary>
        /// <param name="cUserID"></param>
        /// <param name="iGroupID"></param>
        /// <returns></returns>
        public static int ORCS_GroupMember_INSERT(object cUserID, object iGroupID, object cGroupClassify)
        {
            clsORCSDB ORCSDB       = new clsORCSDB();
            string    strAthority  = AllSystemUserUtil.GetAuthourityByUserID(cUserID.ToString());
            string    strTableName = GetTableNameByGroupClassify(cGroupClassify.ToString(), strAthority);
            string    strSQL       = "INSERT INTO " + strTableName + "(cUserID, iGroupID) VALUES('" + cUserID + "','" + iGroupID + "')";

            try
            {
                ORCSDB.ExecuteNonQuery(strSQL);
            }
            catch
            {
                return(-1);
            }
            return(0);
        }