Esempio n. 1
0
        public static void DeleteFavourite(string fID)
        {
            string sql = @"DELETE FROM  MOBILEAPP_FAVOURITE WHERE ID=:fID ";

            DataSet ds = OracleDataTool.ExecuteDataset(ConnectStringOracle.GetTableConnection(), sql);

            OracleParameter[] para = new OracleParameter[1];
            para[0] = new OracleParameter("fID", fID);

            OracleDataTool.ExecuteNonQuery(ConnectStringOracle.GetTableConnection(), sql, para);
        }
Esempio n. 2
0
        public static void DeleteLogEvent(string logID)
        {
            string sql = @"DELETE FROM  MOBILEAPP_LOGEVENT WHERE LOGID=:logID ";

            DataSet ds = OracleDataTool.ExecuteDataset(ConnectStringOracle.GetTableConnection(), sql);

            OracleParameter[] para = new OracleParameter[1];
            para[0] = new OracleParameter("logID", logID);

            OracleDataTool.ExecuteNonQuery(ConnectStringOracle.GetTableConnection(), sql, para);
        }
Esempio n. 3
0
        public static void DeleteVisitMsg(string visitID)
        {
            string sql = @"DELETE FROM  MOBILEAPP_VISIT WHERE VISITID=:visitID ";

            DataSet ds = OracleDataTool.ExecuteDataset(ConnectStringOracle.GetTableConnection(), sql);

            OracleParameter[] para = new OracleParameter[1];
            para[0] = new OracleParameter("visitID", visitID);

            OracleDataTool.ExecuteNonQuery(ConnectStringOracle.GetTableConnection(), sql, para);
        }
Esempio n. 4
0
        public static void UpdateLogEvent(string logID, string eventType, string message, string errorStackTrace, DateTime eventDate)
        {
            string sql = @"UPDATE MOBILEAPP_LOGEVENT SET EventType=:eventType, Message=:message, ErrorStackTrace=:errorStackTrace, EventDate=to_date(:eventDate,'yyyy-MM-DD hh24:mi:ss')
                           WHERE LOGID=:logID";

            OracleParameter[] para = new OracleParameter[5];
            para[0] = new OracleParameter("logID", logID);
            para[1] = new OracleParameter("eventType", eventType);
            para[2] = new OracleParameter("message", message);
            para[3] = new OracleParameter("errorStackTrace", errorStackTrace);
            para[4] = new OracleParameter("eventDate", eventDate.ToString());

            OracleDataTool.ExecuteNonQuery(ConnectStringOracle.GetTableConnection(), sql, para);
        }
Esempio n. 5
0
        public static void InsertLogEvent(string eventType, string message, string errorStackTrace, DateTime eventDate)
        {
            string sql = @"INSERT INTO MOBILEAPP_LOGEVENT
                            (LOGID, EventType, Message, ErrorStackTrace, EventDate )
                            VALUES ( SEQ_MOBILEAPP.Nextval, :eventType ,:message ,:errorStackTrace ,to_date(:eventDate,'yyyy-MM-DD hh24:mi:ss') )";

            OracleParameter[] para = new OracleParameter[4];
            para[0] = new OracleParameter("eventType", eventType);
            para[1] = new OracleParameter("message", message);
            para[2] = new OracleParameter("errorStackTrace", errorStackTrace);
            para[3] = new OracleParameter("eventDate", eventDate.ToString());


            OracleDataTool.ExecuteNonQuery(ConnectStringOracle.GetTableConnection(), sql, para);
        }
Esempio n. 6
0
        public static void UpdateVisitMsg(string visitID, string ip, DateTime visitDate, string browser, string mobileUserAgent, string userName)
        {
            string sql = @"UPDATE MOBILEAPP_VISIT SET IP=:ip ,VISIT_DATE=to_date(:visitDate,'yyyy-MM-DD hh24:mi:ss') ,BROWSER=:browser, MOBILE_USER_AGENT=:mobileUserAgent, USERNAME=:userName
                           WHERE VISITID=:visitID";

            OracleParameter[] para = new OracleParameter[6];
            para[0] = new OracleParameter("visitID", visitID);
            para[1] = new OracleParameter("ip", ip);
            para[2] = new OracleParameter("visitDate", visitDate.ToString());
            para[3] = new OracleParameter("browser", browser);
            para[4] = new OracleParameter("mobileUserAgent", mobileUserAgent);
            para[5] = new OracleParameter("userName", userName);

            OracleDataTool.ExecuteNonQuery(ConnectStringOracle.GetTableConnection(), sql, para);
        }
Esempio n. 7
0
        public static void InsertVisitMsg(string visitID, string ip, DateTime visitDate, string browser, string mobileUserAgent, string userName)
        {
            string sql = @"INSERT INTO MOBILEAPP_VISIT
                            ( VISITID ,IP, VISIT_DATE, BROWSER ,MOBILE_USER_AGENT ,USERNAME)
                            VALUES ( SEQ_MOBILEAPP.Nextval, :ip ,to_date(:visitDate,'yyyy-MM-DD hh24:mi:ss') ,:browser ,:mobileUserAgent ,:userName)";

            OracleParameter[] para = new OracleParameter[5];
            para[0] = new OracleParameter("ip", ip);
            para[1] = new OracleParameter("visitDate", visitDate.ToString());
            para[2] = new OracleParameter("browser", browser);
            para[3] = new OracleParameter("mobileUserAgent", mobileUserAgent);
            para[4] = new OracleParameter("userName", userName);

            OracleDataTool.ExecuteNonQuery(ConnectStringOracle.GetTableConnection(), sql, para);
        }
Esempio n. 8
0
        public static DataTable GetVisitMsgs()
        {
            string sql = @"SELECT VISITID ,IP, VISIT_DATE, BROWSER ,MOBILE_USER_AGENT ,USERNAME
                            FROM  MOBILEAPP_VISIT ";

            DataSet ds = OracleDataTool.ExecuteDataset(ConnectStringOracle.GetTableConnection(), sql);

            if (ds.Tables[0].Rows.Count == 0)
            {
                return(null);
            }
            else
            {
                return(ds.Tables[0]);
            }
        }
Esempio n. 9
0
        public static DataTable GetLogEvents()
        {
            string sql = @"SELECT LOGID, EventType, Message, ErrorStackTrace, EventDate
                            FROM  MOBILEAPP_LOGEVENT ";

            DataSet ds = OracleDataTool.ExecuteDataset(ConnectStringOracle.GetTableConnection(), sql);

            if (ds.Tables[0].Rows.Count == 0)
            {
                return(null);
            }
            else
            {
                return(ds.Tables[0]);
            }
        }
Esempio n. 10
0
File: Notice.cs Progetto: 4bb/Bao
        public static DataTable GetNotices()
        {
            string sql = @"SELECT  NoticeID, NoticeTitle, CreateTime, NoticeContent, IsActive, Remark
                            FROM MobileApp_Notice ORDER BY  CreateTime DESC";

            DataSet ds = OracleDataTool.ExecuteDataset(ConnectStringOracle.GetTableConnection(), sql);

            if (ds.Tables[0].Rows.Count == 0)
            {
                return(null);
            }
            else
            {
                return(ds.Tables[0]);
            }
        }
Esempio n. 11
0
        public static DataTable GetFavourites()
        {
            string sql = @"SELECT ID, URL, USERNAME, CREATETIME, STATUS, UPDATETIME ,OBJECTID , OBJECTCONTENT ,OBJECTTYPE ,ISACTIVE ,REMARK 
                            FROM  MOBILEAPP_FAVOURITE ORDER BY STATUS DESC, UPDATETIME DESC, CREATETIME DESC";

            DataSet ds = OracleDataTool.ExecuteDataset(ConnectStringOracle.GetTableConnection(), sql);

            if (ds.Tables[0].Rows.Count == 0)
            {
                return(null);
            }
            else
            {
                return(ds.Tables[0]);
            }
        }
Esempio n. 12
0
        public static DataRow GetLogEventByID(string logID)
        {
            string sql = @"SELECT LOGID, EventType, Message, ErrorStackTrace, EventDate
                            FROM MOBILEAPP_LOGEVENT WHERE (LOGID = :logID) ";

            OracleParameter[] para = new OracleParameter[1];
            para[0] = new OracleParameter("logID", logID);

            DataSet ds = OracleDataTool.ExecuteDataset(ConnectStringOracle.GetTableConnection(), sql, para);

            if (ds.Tables[0].Rows.Count == 0)
            {
                return(null);
            }
            else
            {
                return(ds.Tables[0].Rows[0]);
            }
        }
Esempio n. 13
0
        public static DataRow GetVisitMsgByID(string logID)
        {
            string sql = @"SELECT  VISITID ,IP, VISIT_DATE, BROWSER ,MOBILE_USER_AGENT ,USERNAME
                            FROM MOBILEAPP_VISIT WHERE (LOGID = :logID) ";

            OracleParameter[] para = new OracleParameter[1];
            para[0] = new OracleParameter("logID", logID);

            DataSet ds = OracleDataTool.ExecuteDataset(ConnectStringOracle.GetTableConnection(), sql, para);

            if (ds.Tables[0].Rows.Count == 0)
            {
                return(null);
            }
            else
            {
                return(ds.Tables[0].Rows[0]);
            }
        }
Esempio n. 14
0
        public static DataRow GetFavouriteByID(string fID)
        {
            string sql = @"SELECT ID, URL, USERNAME, CREATETIME, STATUS, UPDATETIME , OBJECTID , OBJECTCONTENT,OBJECTTYPE, ISACTIVE ,REMARK
                            FROM MOBILEAPP_FAVOURITE WHERE (ID = :fID) ";

            OracleParameter[] para = new OracleParameter[1];
            para[0] = new OracleParameter("fID", fID);

            DataSet ds = OracleDataTool.ExecuteDataset(ConnectStringOracle.GetTableConnection(), sql, para);

            if (ds.Tables[0].Rows.Count == 0)
            {
                return(null);
            }
            else
            {
                return(ds.Tables[0].Rows[0]);
            }
        }
Esempio n. 15
0
File: Notice.cs Progetto: 4bb/Bao
        public static DataRow GetNoticeByID(string nID)
        {
            string sql = @"SELECT NoticeID, NoticeTitle, CreateTime, NoticeContent, IsActive, Remark
                            FROM MobileApp_Notice WHERE (NoticeID = :nID)";

            OracleParameter[] para = new OracleParameter[1];
            para[0] = new OracleParameter("nID", nID);

            DataSet ds = OracleDataTool.ExecuteDataset(ConnectStringOracle.GetTableConnection(), sql, para);

            if (ds.Tables[0].Rows.Count == 0)
            {
                return(null);
            }
            else
            {
                return(ds.Tables[0].Rows[0]);
            }
        }
Esempio n. 16
0
        public static void InsertFavourite(string fID, string url, string userName, DateTime createTime, int status, DateTime updateTime, string objectID, string objectContent, string objectType, int isActive, string remark)
        {
            string sql = @"INSERT INTO MOBILEAPP_FAVOURITE
                            (ID, URL, USERNAME, CREATETIME, STATUS, UPDATETIME , OBJECTID, OBJECTCONTENT,OBJECTTYPE , ISACTIVE ,REMARK  )
                            VALUES ( SEQ_MOBILEAPP.Nextval, :url ,:userName ,to_date(:createTime,'yyyy-MM-DD hh24:mi:ss') ,:status ,to_date(:updateTime,'yyyy-MM-DD hh24:mi:ss') ,:objectID ,:objectContent , :objectType, :isActive ,:remark )";

            OracleParameter[] para = new OracleParameter[10];
            para[0] = new OracleParameter("url", url);
            para[1] = new OracleParameter("userName", userName);
            para[2] = new OracleParameter("createTime", createTime.ToString());
            para[3] = new OracleParameter("status", status);
            para[4] = new OracleParameter("updateTime", updateTime.ToString());
            para[5] = new OracleParameter("objectID", objectID);
            para[6] = new OracleParameter("objectContent", objectContent);
            para[7] = new OracleParameter("objectType", objectType);
            para[8] = new OracleParameter("isActive", isActive);
            para[9] = new OracleParameter("remark", remark);

            OracleDataTool.ExecuteNonQuery(ConnectStringOracle.GetTableConnection(), sql, para);
        }
Esempio n. 17
0
        public static void UpdateFavourite(string fID, string url, string userName, DateTime createTime, int status, DateTime updateTime, string objectID, string objectContent, string objectType, int isActive, string remark)
        {
            string sql = @"UPDATE MOBILEAPP_FAVOURITE SET URL=:url, USERNAME=:userName, CREATETIME=to_date(:createTime ,'yyyy-MM-DD hh24:mi:ss'), STATUS=:status,
                           UPDATETIME=to_date(:updateTime,'yyyy-MM-DD hh24:mi:ss'), OBJECTID=:objectID, OBJECTCONTENT=:objectContent, OBJECTTYPE=:objectType, ISACTIVE=:isActive, REMARK=:remark
                           WHERE ID=:fID";

            OracleParameter[] para = new OracleParameter[11];
            para[0]  = new OracleParameter("fID", fID);
            para[1]  = new OracleParameter("url", url);
            para[2]  = new OracleParameter("userName", userName);
            para[3]  = new OracleParameter("createTime", createTime.ToString());
            para[4]  = new OracleParameter("status", status);
            para[5]  = new OracleParameter("updateTime", updateTime.ToString());
            para[6]  = new OracleParameter("objectID", objectID);
            para[7]  = new OracleParameter("objectContent", objectContent);
            para[8]  = new OracleParameter("objectType", objectType);
            para[9]  = new OracleParameter("isActive", isActive);
            para[10] = new OracleParameter("remark", remark);

            OracleDataTool.ExecuteNonQuery(ConnectStringOracle.GetTableConnection(), sql, para);
        }