public JsonResult GetOrders() { int dataStart = int.Parse(Request.Form["offset"]); int pageSize = int.Parse(Request.Form["pageSize"]); string dateTime = Request.Form["dateTime"]; string search = Request.Form["search"]; string stime = ""; string etime = ""; if (!String.IsNullOrEmpty(dateTime)) { stime = dateTime.Split('—')[0] + " 00:00:00"; etime = dateTime.Split('—')[1] + " 23:59:59"; } else { stime = ""; etime = ""; } string accountList = GetClientUser(); int total = 0; List <MT4_Trades> list = new MT4AccountManagerBll().GetOrders(pageSize, dataStart, stime, etime, accountList, search, out total); var grid = new { total = total, rows = list }; return(Json(grid)); }
public JsonResult GetStatics() { string login = Request.Form["login"]; //string accountList = GetClientUser(); List <MT4AccountStatisticalInfo> list = new MT4AccountManagerBll().GetAccountStatisticalInfo(login, "", ""); var grid = new { rows = list, total = list.Count }; return(Json(grid)); }
public string GetAccountStatistics(string stime, string etime) { string accountList = GetClientUser(); List <MT4AccountStatisticalInfo> list = new MT4AccountManagerBll().GetAccountStatisticalInfo(accountList, stime, etime); JavaScriptSerializer jss = new JavaScriptSerializer(); jss.MaxJsonLength = Int32.MaxValue; return(jss.Serialize(list)); }
public string GetMt4User() { string login = Request.Cookies["MT4User"]["login"]; string role = Request.Cookies["MT4User"]["role"]; List <MT4_UsersInfo> list = new MT4AccountManagerBll().GetAccountByAgent(login, role); JavaScriptSerializer jss = new JavaScriptSerializer(); jss.MaxJsonLength = Int32.MaxValue; return(jss.Serialize(list)); }
public string GetClientUser() { List <MT4_UsersInfo> list = new MT4AccountManagerBll().GetAccountByAgent(Request.Cookies["MT4User"]["login"], Request.Cookies["MT4User"]["role"]); string user = ""; for (int i = 0; i < list.Count; i++) { user += list[i].MT4_UsersLogin + ","; } return(string.IsNullOrEmpty(user) ? "" : user.Substring(0, user.Length - 1)); }