Exemplo n.º 1
0
 public int InsReqUrlLog(ReqUrl_Log requrllog)
 {
     try
     {
         object o = ExcelSqlHelper.ExecuteScalar("insert into ReqUrl_Log(urlstr,hoststr,paramstr,subtime) values('" + requrllog.urlstr + "','" + requrllog.hoststr + "','" + requrllog.paramstr + "','" + requrllog.subtime + "');select @@identity;");
         return(int.Parse(o.ToString()));
     }
     catch
     {
         return(0);
     }
 }
Exemplo n.º 2
0
        internal ReqUrl_Log GetReqUrlLogById(string mid)
        {
            DataTable dt = ExcelSqlHelper.ExecuteDataTable("select * from ReqUrl_Log where mid=" + mid);

            if (dt != null)
            {
                ReqUrl_Log m = new ReqUrl_Log
                {
                    mid      = int.Parse(dt.Rows[0]["mid"].ToString()),
                    urlstr   = dt.Rows[0]["urlstr"].ToString(),
                    hoststr  = dt.Rows[0]["hoststr"].ToString(),
                    paramstr = dt.Rows[0]["paramstr"].ToString(),
                    subtime  = DateTime.Parse(dt.Rows[0]["subtime"].ToString())
                };
                return(m);
            }
            else
            {
                return(null);
            }
        }