//,convert(nvarchar(max),decryptByPassPhrase('root@',Phone)) as P,convert(nvarchar(max),decryptByPassPhrase('root@',Email)) as E #region GetLover public List <ElementDataList> GetLover(double sLatitude, double sLongitude, string Gender, int Age) { var dataList = new List <ElementDataList>(); ElementDataList mg; try { DataTable dt = db.getAllByQuery("select * from Lover where Gender='" + Gender + "' and Age=" + Age); #region Looping Lover foreach (DataRow rows in dt.Rows) { //if (GetDistance(sLatitude, sLongitude, Convert.ToDouble(rows["Lat"]), Convert.ToDouble(rows["Lng"])) < 3) //{ mg = new ElementDataList { Element1 = rows["ID"].ToString(), Element2 = rows["Lat"].ToString(), Element3 = rows["Lng"].ToString() }; dataList.Add(mg); //} } #endregion return(dataList); } catch { return(dataList); } }
public List <ElementDataList> GetTownByStateRegionID(int StateRegionID) { var dataList = new List <ElementDataList>(); ElementDataList mg; DataTable dt = db.getAllByQuery("select * from Town where StateRegionID=" + StateRegionID); foreach (DataRow rows in dt.Rows) { mg = new ElementDataList { Element1 = rows["ID"].ToString(), Element2 = rows["MName"].ToString(), Element3 = rows["EName"].ToString() }; dataList.Add(mg); } return(dataList); }