Пример #1
0
        private void InsertRequestLog(string json, ResutlModel res)
        {
            SFInfo_DAL        dal = new SFInfo_DAL();
            SF_Submit_Request ssr = new SF_Submit_Request();

            ssr.UUID           = Guid.NewGuid().ToString();
            ssr.RequestContent = json;
            ssr.RequestTime    = DateTime.Now;
            ssr.Result         = res.Message;
            ssr.ResFlag        = res.IsSuccess?1:-1;
            dal.InsertRequestLog(ssr);
        }
Пример #2
0
        internal void InsertRequestLog(SF_Submit_Request ssr)
        {
            DbHelper dbHelper = new DbHelper();

            dbHelper.SetProvider(MyDBType.Oracle);
            dbHelper.Conn = new Oracle.DataAccess.Client.OracleConnection(SXK);
            if (dbHelper.Conn.State != System.Data.ConnectionState.Open)
            {
                dbHelper.Conn.Open();
            }
            string sql = dbHelper.CreateInsertStr <SF_Submit_Request>(ssr, "SF_Submit_Request", MyDBType.Oracle);

            sql = sql.Trim().Replace("\r\n", "");
            DbParameter[] param = dbHelper.GetParamArray <SF_Submit_Request>(ssr, MyDBType.Oracle);
            dbHelper.ExecuteNonQuery(dbHelper.Conn, System.Data.CommandType.Text, sql, param);
        }