Beispiel #1
0
        /// <summary>
        /// 從TimeControl資料表取得資料
        /// </summary>
        /// <param name="cTimeControlName"></param>
        /// <returns></returns>
        public static DataTable ORCS_TimeControl_SELECT(object cTimeControlName)
        {
            clsORCSDB ORCSDB = new clsORCSDB();
            string    strSQL = "SELECT * FROM ORCS_TimeControl WHERE cTimeControlName LIKE '" + cTimeControlName + "' ORDER BY iTimeControlID ASC ";

            return(ORCSDB.GetDataSet(strSQL).Tables[0]);
        }
Beispiel #2
0
        /// <summary>
        /// 從TimeControl資料表取得資料
        /// </summary>
        /// <param name="cTimeControlName"></param>
        /// <param name="iClassGroupID"></param>
        /// <returns></returns>
        public static DataTable ORCS_TimeControl_SELECT_TimeConName_GroupID(object cTimeControlName, object iClassGroupID)
        {
            clsORCSDB ORCSDB = new clsORCSDB();
            string    strSQL = "SELECT * FROM ORCS_TimeControl WHERE cTimeControlName LIKE '" + cTimeControlName + "' AND iClassGroupID LIKE '" + iClassGroupID + "' ORDER BY iTimeControlID ASC ";

            return(ORCSDB.GetDataSet(strSQL).Tables[0]);
        }
Beispiel #3
0
        /// <summary>
        /// 在TimeControl資料表存入資料
        /// </summary>
        /// <param name="cTimeControlName"></param>
        /// <param name="cTime"></param>
        /// <param name="iClassGroupID"></param>
        /// <returns></returns>
        public static int ORCS_TimeControl_INSERT_TimeName_Time_GroupID(object cTimeControlName, object cTime, object iClassGroupID)
        {
            clsORCSDB ORCSDB = new clsORCSDB();
            string    strSQL = "INSERT INTO ORCS_TimeControl(cTimeControlName, cTime, iClassGroupID) VALUES('" + cTimeControlName + "','" + cTime + "','" + iClassGroupID + "')";

            try
            {
                ORCSDB.ExecuteNonQuery(strSQL);
            }
            catch
            {
                return(-1);
            }
            return(0);
        }
Beispiel #4
0
        /// <summary>
        /// 在TimeControl資料表刪除資料
        /// </summary>
        /// <param name="cTimeControlName"></param>
        /// <returns></returns>
        public static int ORCS_TimeControl_DELETE(object cTimeControlName)
        {
            clsORCSDB ORCSDB = new clsORCSDB();
            string    strSQL = "DELETE ORCS_TimeControl WHERE cTimeControlName LIKE '" + cTimeControlName + "'";

            try
            {
                ORCSDB.ExecuteNonQuery(strSQL);
            }
            catch
            {
                return(-1);
            }
            return(0);
        }
Beispiel #5
0
        /// <summary>
        /// 在TimeControl資料表刪除資料
        /// </summary>
        /// <param name="cTimeControlName"></param>
        /// <param name="iClassGroupID"></param>
        /// <returns></returns>
        public static int ORCS_TimeControl_DELETE_TimeConName_GroupID(object cTimeControlName, object iClassGroupID)
        {
            clsORCSDB ORCSDB = new clsORCSDB();
            string    strSQL = "DELETE ORCS_TimeControl WHERE cTimeControlName LIKE '" + cTimeControlName + "' AND iClassGroupID LIKE '" + iClassGroupID + "'";

            try
            {
                ORCSDB.ExecuteNonQuery(strSQL);
            }
            catch
            {
                return(-1);
            }
            return(0);
        }
Beispiel #6
0
        /// <summary>
        /// 在SystemControl資料表存入資料
        /// </summary>
        /// <param name="cSysControlName"></param>
        /// <param name="iClassGroupID"></param>
        /// <returns></returns>
        public static int ORCS_SystemControl_INSERT_SysName_GroupID(object cSysControlName, object iClassGroupID)
        {
            clsORCSDB ORCSDB = new clsORCSDB();
            string    strSQL = "INSERT INTO ORCS_SystemControl(cSysControlName, iClassGroupID ,iAnswerMode) VALUES('" + cSysControlName + "','" + iClassGroupID + "','0')";

            try
            {
                ORCSDB.ExecuteNonQuery(strSQL);
            }
            catch
            {
                return(-1);
            }
            return(0);
        }
Beispiel #7
0
        /// <summary>
        /// 在SystemControl資料表存入資料
        /// </summary>
        /// <param name="cSysControlName"></param>
        /// <returns></returns>
        public static int ORCS_SystemControl_INSERT(object cSysControlName)
        {
            clsORCSDB ORCSDB = new clsORCSDB();
            string    strSQL = "INSERT INTO ORCS_SystemControl(cSysControlName) VALUES('" + cSysControlName + "')";

            try
            {
                ORCSDB.ExecuteNonQuery(strSQL);
            }
            catch
            {
                return(-1);
            }
            return(0);
        }
Beispiel #8
0
        /// <summary>
        /// 在SystemControl資料表更新資料
        /// </summary>
        /// <param name="cSysControlName"></param>
        /// <param name="iSysControlParam"></param>
        /// <param name="cStartTime"></param>
        /// <param name="cEndTime"></param>
        /// <param name="iClassGroupID"></param>
        /// <param name="iAnswerMode"></param>
        /// <returns></returns>
        public static int ORCS_SystemControl_UPDATE_SysName_Param_StartTime_EndTime_GroupID_AnswerMode(object cSysControlName, object iSysControlParam, object cStartTime, object cEndTime, object iClassGroupID, object iAnswerMode)
        {
            clsORCSDB ORCSDB = new clsORCSDB();
            string    strSQL = "UPDATE ORCS_SystemControl SET iSysControlParam = '" + iSysControlParam + "' ,cStartTime = '" + cStartTime + "' ,cEndTime = '" + cEndTime + "' ,iAnswerMode = '" + iAnswerMode + "' WHERE cSysControlName LIKE '" + cSysControlName + "' AND iClassGroupID LIKE '" + iClassGroupID + "'";

            try
            {
                ORCSDB.ExecuteNonQuery(strSQL);
            }
            catch
            {
                return(-1);
            }
            return(0);
        }
Beispiel #9
0
        /// <summary>
        /// 在SystemControl資料表更新資料
        /// </summary>
        /// <param name="cSysControlName"></param>
        /// <param name="cEndTime"></param>
        /// <param name="iClassGroupID"></param>
        /// <returns></returns>
        public static int ORCS_SystemControl_UPDATE_SysName_EndTime_GroupID(object cSysControlName, object cEndTime, object iClassGroupID)
        {
            clsORCSDB ORCSDB = new clsORCSDB();
            string    strSQL = "UPDATE ORCS_SystemControl SET cEndTime = '" + cEndTime + "' WHERE cSysControlName LIKE '" + cSysControlName + "' AND iClassGroupID LIKE '" + iClassGroupID + "'";

            try
            {
                ORCSDB.ExecuteNonQuery(strSQL);
            }
            catch
            {
                return(-1);
            }
            return(0);
        }
Beispiel #10
0
        /// <summary>
        /// 在SystemControl資料表更新資料
        /// </summary>
        /// <param name="cSysControlName"></param>
        /// <param name="iSysControlParam"></param>
        /// <returns></returns>
        public static int ORCS_SystemControl_UPDATE(object cSysControlName, object iSysControlParam)
        {
            clsORCSDB ORCSDB = new clsORCSDB();
            string    strSQL = "UPDATE ORCS_SystemControl SET iSysControlParam = '" + iSysControlParam + "' WHERE cSysControlName LIKE '" + cSysControlName + "'";

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