コード例 #1
0
ファイル: WebService.cs プロジェクト: jibenet/jibenet
 public string PropertyListI(string buyorrent, string type, string address, string neighborhood, string startArea, string startRate, string endArea, string endRate)
 {
     try
     {
         PropertyBAL oPropertyBAL = new PropertyBAL();
         PropertyBO oPropertyBO = new PropertyBO();
         PropertyBO oIPropertyBO = new PropertyBO();
         oPropertyBO.address = address;
         oPropertyBO.type = type;
         oPropertyBO.buyorrent = buyorrent;
         oPropertyBO.neighborhood = neighborhood;
         oPropertyBO.size = long.Parse(startArea);
         oPropertyBO.rate = long.Parse(startRate);
         oIPropertyBO.size = long.Parse(endArea);
         oIPropertyBO.rate = long.Parse(endRate);
         DataTable dt = new DataTable();
         dt = oPropertyBAL.FindProperty(oPropertyBO, oIPropertyBO);
         JSONClass objJSONClass = new JSONClass();
         return objJSONClass.CreateJSONParameters(dt);
     }
     catch
     {
         throw;
     }
 }
コード例 #2
0
ファイル: WebService.aspx.cs プロジェクト: jibenet/jibenet
    public string PropertyList(string buyorrent, string type, string address)
    {
        try
        {
            PropertyBAL oPropertyBAL = new PropertyBAL();
            PropertyBO oPropertyBO = new PropertyBO();
            oPropertyBO.buyorrent = buyorrent;
            oPropertyBO.type = type;
            oPropertyBO.address = address;
            DataTable dt = new DataTable();
            dt = oPropertyBAL.FindProperty(oPropertyBO);
            System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
            List<Dictionary<string, object>> rows = new List<Dictionary<string, object>>();
            Dictionary<string, object> row = null;

            foreach (DataRow dr in dt.Rows)
            {
                row = new Dictionary<string, object>();
                foreach (DataColumn col in dt.Columns)
                {
                    row.Add(col.ColumnName.Trim(), dr[col]);
                }
                rows.Add(row);
            }
            return serializer.Serialize(rows);
        }
        catch
        {
            return "Time Out";
        }
    }
コード例 #3
0
        public HttpResponseMessage GetTop10Listing(string type, string city, string extra = "")
        {
            PropertyBAL propBAL = new PropertyBAL(new PropertyRepository());

            return(new HttpResponseMessage()
            {
                Content = new StringContent(JsonConvert.SerializeObject(propBAL.GetProperties(type, city, extra, 1)), System.Text.Encoding.UTF8, "text/html")
            });
        }
コード例 #4
0
ファイル: WebService.cs プロジェクト: jibenet/jibenet
 public string PropertyList(string buyorrent, string type, string address)
 {
     try
     {
         PropertyBAL oPropertyBAL = new PropertyBAL();
         PropertyBO oPropertyBO = new PropertyBO();
         oPropertyBO.address = address;
         oPropertyBO.type = type;
         oPropertyBO.buyorrent = buyorrent;
         DataTable dt = new DataTable();
         dt = oPropertyBAL.FindProperty(oPropertyBO);
         JSONClass objJSONClass = new JSONClass();
         return objJSONClass.CreateJSONParameters(dt);
     }
     catch
     {
         throw;
     }
 }