public string GetDataDirect(string actionName) { // get all of data. var _ds = new Select().SelectLists(actionName); return(LZStringUpdated.compressToUTF16(_ds.GetXml())); }
public string GetSelect2() { HttpContext Context = HttpContext.Current; string pageNum = Context.Request["pageNum"], pageSize = Context.Request["pageSize"], searchTerm = Context.Request["searchTerm"], fnName = Context.Request["fnName"], names = Context.Request["names"], values = Context.Request["values"]; // grid static parameters string[] defaultNames = { "pageNum", "pageSize", "key" }, defaultValues = { pageNum, pageSize, searchTerm }, // get dynamic more parameters from user addtionNames = string.IsNullOrEmpty(names) ? new string[0] : names.Split('~'), addtionValues = string.IsNullOrEmpty(values) ? new string[0] : values.Split('~'), // merge all parameters (union) namesAll = defaultNames.Concat(addtionNames).ToArray(), valuesAll = defaultValues.Concat(addtionValues).ToArray(); var _ds = new Select().SelectLists(fnName, namesAll, valuesAll); return(LZStringUpdated.compressToUTF16(_ds.GetXml())); }
public static object GetDataDirect(string actionName) { var _ds = new Select().SelectLists(actionName); // get all of data. string compressedXML = TrimmerUtil.RemoveSpaces(_ds.GetXml()); return(LZStringUpdated.compressToUTF16(compressedXML)); }
public static object Dash() { string[,] _params = { { "ID", SessionManager.Current.ID } }; var _ds = new Select().SelectLists("Client_Dashboard", _params); // get all of data. return(LZStringUpdated.compressToUTF16(_ds.GetXml())); }
public static object LoadCars() { var param = new jQueryDataTableParamModel(); var Context = HttpContext.Current; param.sEcho = String.IsNullOrEmpty(Context.Request["sEcho"]) ? 0 : Convert.ToInt32(Context.Request["sEcho"]); param.iDisplayStart += String.IsNullOrEmpty(Context.Request["iDisplayStart"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayStart"]); param.iDisplayLength = String.IsNullOrEmpty(Context.Request["iDisplayLength"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayLength"]); var sortColumnIndex = Convert.ToInt32(Context.Request["iSortCol_0"]); var sortDirection = Context.Request["sSortDir_0"]; var finished = Context.Request["finish"] ?? "0"; param.sSearch = String.IsNullOrEmpty(Context.Request["sSearch"]) ? null : Context.Request["sSearch"]; // create filter parameters string[,] _params = { { "DisplayStart", param.iDisplayStart.ToString() }, { "DisplayLength", param.iDisplayLength.ToString() }, { "SearchParam", param.sSearch }, { "SortColumn", sortColumnIndex.ToString() }, { "SortDirection", sortDirection }, { "ClientID", SessionManager.Current.ID }, { "IsDone", finished } }; // get all of data. var _ds = new Select().SelectLists("ClientCars_SelectList", _params); string compressedXML = TrimmerUtil.RemoveSpaces(_ds.GetXml()); return(LZStringUpdated.compressToUTF16(compressedXML)); }
public static object LoadData() { var param = new jQueryDataTableParamModel(); HttpContext Context = HttpContext.Current; param.iDisplayStart += String.IsNullOrEmpty(Context.Request["iDisplayStart"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayStart"]); param.iDisplayLength = String.IsNullOrEmpty(Context.Request["iDisplayLength"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayLength"]); var sortColumnIndex = Convert.ToInt32(Context.Request["iSortCol_0"]); var sortDirection = Context.Request["sSortDir_0"]; // asc or desc string buyerFilter = string.IsNullOrEmpty(Context.Request["buyer"]) ? null : Context.Request["buyer"]; string client = string.IsNullOrEmpty(Context.Request["Client"]) ? null : Context.Request["Client"]; string chassisFilter = string.IsNullOrEmpty(Context.Request["chassis"]) ? null : Context.Request["chassis"]; string auction = string.IsNullOrEmpty(Context.Request["auction"]) ? null : Context.Request["auction"]; string DistinationID = string.IsNullOrEmpty(Context.Request["DistinationID"]) ? null : Context.Request["DistinationID"]; string fromDate = string.IsNullOrEmpty(Context.Request["from"]) ? null : Context.Request["from"], toDate = string.IsNullOrEmpty(Context.Request["to"]) ? null : Context.Request["to"]; // create filter parameters string[,] _params = { { "DisplayStart", param.iDisplayStart.ToString() }, { "DisplayLength", param.iDisplayLength.ToString() }, { "SortColumn", sortColumnIndex.ToString() }, { "SortDirection", sortDirection }, { "From", fromDate }, { "To", toDate }, { "AuctionID", auction }, { "BuyerID", buyerFilter }, { "ChassisNo", chassisFilter }, { "Client", client }, { "DistinationID", DistinationID } }; // get all of data. var _ds = new Select().SelectLists("ExpensesOnCarReportPrint_FillReport", _params); return(LZStringUpdated.compressToUTF16(_ds.GetXml())); }
public static object GetPayInvoicePayments() { jQueryDataTableParamModel param = new jQueryDataTableParamModel(); HttpContext Context = HttpContext.Current; param.sEcho = String.IsNullOrEmpty(Context.Request["sEcho"]) ? 0 : Convert.ToInt32(Context.Request["sEcho"]); //param.sSearch = String.IsNullOrEmpty(Context.Request["sSearch"]) ? "" : Context.Request["sSearch"]; param.iDisplayStart += String.IsNullOrEmpty(Context.Request["iDisplayStart"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayStart"]); param.iDisplayLength = String.IsNullOrEmpty(Context.Request["iDisplayLength"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayLength"]); var sortColumnIndex = Convert.ToInt32(Context.Request["iSortCol_0"]); string sortDirection = Context.Request["sSortDir_0"],// asc or desc ExchangeCompanyID = String.IsNullOrEmpty(Context.Request["ExchangeCompanyID"]) ? null : Context.Request["ExchangeCompanyID"], buyer = String.IsNullOrEmpty(Context.Request["buyer"]) ? null : Context.Request["buyer"], from = String.IsNullOrEmpty(Context.Request["from"]) ? null : Context.Request["from"], to = String.IsNullOrEmpty(Context.Request["to"]) ? null : Context.Request["to"], pending = String.IsNullOrEmpty(Context.Request["Pend"]) ? "0" : Context.Request["Pend"]; // create filter paramters string[,] _params = { { "DisplayStart", param.iDisplayStart.ToString() }, { "DisplayLength", param.iDisplayLength.ToString() }, { "SortColumn", sortColumnIndex.ToString() }, { "SortDirection", sortDirection },// {"SearchParam", param.sSearch}, { "ExchangeCompanyID", ExchangeCompanyID }, { "From", from },{ "To", to }, { "Buyer", buyer }, { "Pend", pending } }; // get all of data. var _ds = new Select().SelectLists("PayInvoicePayments_SelectList", _params); return(LZStringUpdated.compressToUTF16(_ds.GetXml())); }
public static object Childs() { string[,] _params = { { "ID", SessionManager.Current.MasterAccountID } }; var _ds = new Select().SelectLists("ClientsMasterChilds_List", _params); // get all of data. return(LZStringUpdated.compressToUTF16(_ds.GetXml())); }
public static object LoadData() { jQueryDataTableParamModel param = new jQueryDataTableParamModel(); HttpContext Context = HttpContext.Current; param.sEcho = String.IsNullOrEmpty(Context.Request["sEcho"]) ? 0 : Convert.ToInt32(Context.Request["sEcho"]); param.iDisplayStart += String.IsNullOrEmpty(Context.Request["iDisplayStart"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayStart"]); param.iDisplayLength = String.IsNullOrEmpty(Context.Request["iDisplayLength"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayLength"]); var sortColumnIndex = Convert.ToInt32(Context.Request["iSortCol_0"]); var sortDirection = Context.Request["sSortDir_0"];// asc or desc // search paramters var auction = Context.Request["auction"]; string fromDate = null, toDate = null; fromDate = string.IsNullOrEmpty(Context.Request["From"]) ? null : Context.Request["From"]; toDate = string.IsNullOrEmpty(Context.Request["To"]) ? null : Context.Request["To"]; // create filter paramters string[,] _params = { { "DisplayStart", param.iDisplayStart.ToString() }, { "DisplayLength", param.iDisplayLength.ToString() }, { "SortColumn", sortColumnIndex.ToString() }, { "SortDirection", sortDirection }, { "Auction", auction }, { "From", fromDate },{ "To", toDate } }; // get all of data. var _ds = new Select().SelectLists("AuctionCommissions_SelectList", _params); return(LZStringUpdated.compressToUTF16(_ds.GetXml())); }
public static object ReplyNote(string carId, string toID, string note, string file, bool isSelf = false) { // should login first if (SessionManager.Current.ID.Equals("0")) { return(null); } string isReaded = "0"; // send note to the same sender user. if (isSelf) { toID = "1"; // uae group isReaded = "1"; } string[] names = { "CarID", "UserID", "ToGroupID", "Notes", "FileUrl", "Read" }, values = { carId, SessionManager.Current.ID, toID, note, file, isReaded }; var saved = new Select().SelectLists("CarNotes_Save", names, values); return(LZStringUpdated.compressToUTF16(saved.GetXml())); }
public static object LoadData() { jQueryDataTableParamModel param = new jQueryDataTableParamModel(); HttpContext Context = HttpContext.Current; param.sEcho = String.IsNullOrEmpty(Context.Request["sEcho"]) ? 0 : Convert.ToInt32(Context.Request["sEcho"]); param.iDisplayStart += String.IsNullOrEmpty(Context.Request["iDisplayStart"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayStart"]); param.iDisplayLength = String.IsNullOrEmpty(Context.Request["iDisplayLength"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayLength"]); var sortColumnIndex = Convert.ToInt32(Context.Request["iSortCol_0"]); var sortDirection = Context.Request["sSortDir_0"]; // asc or desc // search parameters param.sSearch = String.IsNullOrEmpty(Context.Request["sSearch"]) ? "" : Context.Request["sSearch"]; // create filter parameters string[,] _params = { { "DisplayStart", param.iDisplayStart.ToString() }, { "DisplayLength", param.iDisplayLength.ToString() }, { "SearchParam", param.sSearch }, { "SortColumn", sortColumnIndex.ToString() }, { "SortDirection", sortDirection } }; // get all of data. var _ds = new Select().SelectLists(Context.Request["funName"], _params); return(LZStringUpdated.compressToUTF16(_ds.GetXml())); }
public static object LoadDataTablesXML() { var param = new jQueryDataTableParamModel(); HttpContext Context = HttpContext.Current; param.sSearch = String.IsNullOrEmpty(Context.Request["sSearch"]) ? "" : Context.Request["sSearch"]; param.iDisplayStart += String.IsNullOrEmpty(Context.Request["iDisplayStart"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayStart"]); param.iDisplayLength = String.IsNullOrEmpty(Context.Request["iDisplayLength"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayLength"]); var sortColumnIndex = Convert.ToInt32(Context.Request["iSortCol_0"]); var sortDirection = Context.Request["sSortDir_0"] ?? "desc"; // asc or desc // grid static parameters string[] names = { "DisplayStart", "DisplayLength", "SortColumn", "SortDirection", "SearchParam" }, values = { param.iDisplayStart.ToString(), param.iDisplayLength.ToString(), sortColumnIndex.ToString(), sortDirection, param.sSearch }, // get dynamic more parameters from user addtionNames = string.IsNullOrEmpty(Context.Request["names"]) ? new string[0] : Context.Request["names"].Split('~'), addtionValues = string.IsNullOrEmpty(Context.Request["values"]) ? new string[0] : Context.Request["values"].Split('~'), // merge all parameters (union) namesAll = names.Concat(addtionNames).ToArray(), valuesAll = values.Concat(addtionValues).ToArray(); // get all of data. var _ds = new Select().SelectLists(Context.Request["funName"], namesAll, valuesAll); // return data as xml string compressedXML = TrimmerUtil.RemoveSpaces(_ds.GetXml()); return(LZStringUpdated.compressToUTF16(compressedXML)); }
public static object GetProfile() { string[,] _params = { { "ClientID", SessionManager.Current.ID } }; // create filter parameters var _ds = new Select().SelectLists("Clients_SelectRow", _params); // get all of data. string compressedXML = TrimmerUtil.RemoveSpaces(_ds.GetXml()); return(LZStringUpdated.compressToUTF16(compressedXML)); }
public static string GetCarsList(string[] param, string[] values) { // get all of data. var _ds = new Select().SelectPagedList("SiteSearchCars", param, values); string compressedXML = TrimmerUtil.RemoveSpaces(_ds.GetXml()); return(LZStringUpdated.compressToUTF16(compressedXML)); }
public static object GetData(string actionName, string value) { string[,] _params = { { "Id", value } }; // create filter parameters var _ds = new Select().SelectLists(actionName, _params); // get all of data. string compressedXML = TrimmerUtil.RemoveSpaces(_ds.GetXml()); return(LZStringUpdated.compressToUTF16(compressedXML)); }
public static string GetPagedList(string pageIndex, string pageSize, string actionName) // create filter parameters { string[,] _params = { { "PageIndex", pageIndex }, { "PageSize", pageSize } }; // create filter parameters var _ds = new Select().SelectPagedLists(actionName, _params); // get all of data. string compressedXML = TrimmerUtil.RemoveSpaces(_ds.GetXml()); return(LZStringUpdated.compressToUTF16(compressedXML)); }
public string GetDataByID(string actionName, string value) { // create filter parameters string[,] _params = { { "Id", value } }; // get all of data. var _ds = new Select().SelectLists(actionName, _params); return(LZStringUpdated.compressToUTF16(_ds.GetXml())); }
public static object GetNotificationsNotes() { // create filter parameters string[,] _params = { { "ToUserID", SessionManager.Current.ID } }; // get all of data. var _ds = new Select().SelectLists("CarNotes_NotificationsList", _params); return(LZStringUpdated.compressToUTF16(_ds.GetXml())); }
public static object GetNotes(string actionName, string id) { // create filter parameters string[,] _params = { { "CarID", id }, { "ToUserID", SessionManager.Current.ID } }; // get all of data. var _ds = new Select().SelectLists(actionName, _params); return(LZStringUpdated.compressToUTF16(_ds.GetXml())); }
public string GetDataList(DataListModel param) { if (param == null) { return("Error!! null paramters"); } // get all of data. var _ds = new Select().SelectLists(param.actionName, param.names, param.values); return(LZStringUpdated.compressToUTF16(_ds.GetXml())); }
public static string GetHomeList(string pageIndex, string maker, string type) { // create filter parameters string actionName = "SiteGetHomeCars"; string[,] _params = { { "PageIndex", pageIndex }, { "Maker", maker }, { "PageSize", "6" }, { "Type", type } }; // get all of data. var _ds = new Select().SelectPagedList(actionName, _params); string compressedXML = TrimmerUtil.RemoveSpaces(_ds.GetXml()); return(LZStringUpdated.compressToUTF16(compressedXML)); }
public static object getWebPage(string url) { string htmlPage = ""; #region "read web page" ServicePointManager.Expect100Continue = true; ServicePointManager.DefaultConnectionLimit = 9999; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3; using (var client = new WebClient()) { using (Stream data = client.OpenRead(url)) { using (var reader = new StreamReader(data)) { htmlPage = reader.ReadToEnd(); } } } return(LZStringUpdated.compressToUTF16(htmlPage)); #endregion }
public static object getSelect2(string fnName, string pageNum, string pageSize, string searchTerm, string names, string values) { // grid static parameters string[] defaultNames = { "pageNum", "pageSize", "key" }, defaultValues = { pageNum, pageSize, searchTerm }, // get dynamic more parameters from user addtionNames = string.IsNullOrEmpty(names) ? new string[0] : names.Split('~'), addtionValues = string.IsNullOrEmpty(values) ? new string[0] : values.Split('~'), // merge all parameters (union) namesAll = defaultNames.Concat(addtionNames).ToArray(), valuesAll = defaultValues.Concat(addtionValues).ToArray(); var _ds = new Select().SelectLists(fnName, namesAll, valuesAll); string compressedXML = TrimmerUtil.RemoveSpaces(_ds.GetXml()); return(LZStringUpdated.compressToUTF16(compressedXML)); }
public static object LoadData() { jQueryDataTableParamModel param = new jQueryDataTableParamModel(); HttpContext Context = HttpContext.Current; param.sEcho = String.IsNullOrEmpty(Context.Request["sEcho"]) ? 0 : Convert.ToInt32(Context.Request["sEcho"]); param.iDisplayStart += String.IsNullOrEmpty(Context.Request["iDisplayStart"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayStart"]); param.iDisplayLength = String.IsNullOrEmpty(Context.Request["iDisplayLength"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayLength"]); var sortColumnIndex = Convert.ToInt32(Context.Request["iSortCol_0"]); var sortDirection = Context.Request["sSortDir_0"]; // asc or desc var id = Context.Request["id"]; // user id // search parameters param.sSearch = String.IsNullOrEmpty(Context.Request["sSearch"]) ? "" : Context.Request["sSearch"]; // create filter parameters string[,] _params = { { "DisplayStart", param.iDisplayStart.ToString() }, { "DisplayLength", param.iDisplayLength.ToString() }, { "SearchParam", param.sSearch }, { "SortColumn", sortColumnIndex.ToString() }, { "SortDirection", sortDirection },{ "id", id } }; // get all of data. var _ds = new Select().SelectLists("Vacations_SelectList", _params); return(LZStringUpdated.compressToUTF16(_ds.GetXml())); //// inhance data to be list. //var rows = DataUtilities.ConvertDTToList(_ds.Tables[0]); //var data = new //{ // sEcho = param.sEcho, // iTotalRecords = _ds.Tables[1].Rows[0][0], // iTotalDisplayRecords = _ds.Tables[1].Rows[0][0], // aaData = rows.ToList() //}; //return data; }
public static object LoadData() { jQueryDataTableParamModel param = new jQueryDataTableParamModel(); HttpContext Context = HttpContext.Current; param.sEcho = String.IsNullOrEmpty(Context.Request["sEcho"]) ? 0 : Convert.ToInt32(Context.Request["sEcho"]); param.sSearch = String.IsNullOrEmpty(Context.Request["sSearch"]) ? "" : Context.Request["sSearch"]; param.iDisplayStart += String.IsNullOrEmpty(Context.Request["iDisplayStart"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayStart"]); param.iDisplayLength = String.IsNullOrEmpty(Context.Request["iDisplayLength"]) ? 50 : Convert.ToInt32(Context.Request["iDisplayLength"]); var sortColumnIndex = Convert.ToInt32(Context.Request["iSortCol_0"]); var sortDirection = Context.Request["sSortDir_0"]; // asc or desc var finished = Context.Request["type"]; var client = Context.Request["client"] ?? null; var ClientChar = Context.Request["client_char"] ?? null; // filter by client select on page top search box. if (string.IsNullOrEmpty(param.sSearch) && !string.IsNullOrEmpty(client)) { param.sSearch = client; finished = "2"; } // filter by client first character on page top search bar. if (string.IsNullOrEmpty(param.sSearch) && !string.IsNullOrEmpty(ClientChar)) { param.sSearch = ClientChar; finished = "2"; } // create filter parameters string[,] _params = { { "DisplayStart", param.iDisplayStart.ToString() }, { "DisplayLength", param.iDisplayLength.ToString() }, { "SearchParam", param.sSearch }, { "SortColumn", sortColumnIndex.ToString() },{ "SortDirection", sortDirection }, { "Finished", finished } }; // get all of data. var _ds = new Select().SelectLists("Clients_SelectList", _params); return(LZStringUpdated.compressToUTF16(_ds.GetXml())); }
public static object LoadData() { jQueryDataTableParamModel param = new jQueryDataTableParamModel(); HttpContext Context = HttpContext.Current; param.sEcho = String.IsNullOrEmpty(Context.Request["sEcho"]) ? 0 : Convert.ToInt32(Context.Request["sEcho"]); param.iDisplayStart += String.IsNullOrEmpty(Context.Request["iDisplayStart"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayStart"]); param.iDisplayLength = String.IsNullOrEmpty(Context.Request["iDisplayLength"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayLength"]); // search paramters string fromDate = null, toDate = null; fromDate = string.IsNullOrEmpty(Context.Request["From"]) ? null : Context.Request["From"]; toDate = string.IsNullOrEmpty(Context.Request["To"]) ? null : Context.Request["To"]; // create filter paramters string[,] _params = { { "DisplayStart", param.iDisplayStart.ToString() }, { "DisplayLength", param.iDisplayLength.ToString() }, { "From", fromDate },{ "To", toDate } }; var _ds = new Select().SelectLists("BankBalances_SelectList", _params); // get all of data. return(LZStringUpdated.compressToUTF16(_ds.GetXml())); }
public static object LoadData() { var param = new jQueryDataTableParamModel(); var Context = HttpContext.Current; param.sEcho = String.IsNullOrEmpty(Context.Request["sEcho"]) ? 0 : Convert.ToInt32(Context.Request["sEcho"]); param.sSearch = String.IsNullOrEmpty(Context.Request["sSearch"]) ? null : Context.Request["sSearch"]; param.iDisplayStart += String.IsNullOrEmpty(Context.Request["iDisplayStart"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayStart"]); param.iDisplayLength = String.IsNullOrEmpty(Context.Request["iDisplayLength"]) ? 50 : Convert.ToInt32(Context.Request["iDisplayLength"]); var sortColumnIndex = Convert.ToInt32(Context.Request["iSortCol_0"]); string sortDirection = Context.Request["sSortDir_0"], // asc or desc clientId = string.Format("{0}", Context.Request["client"]), isDone = string.Format("{0}", Context.Request["done"] ?? "0"), SelectCarID = String.IsNullOrEmpty(Context.Request["selectedCarId"]) ? null : Context.Request["selectedCarId"]; // create filter parameters string[,] _params = { { "DisplayStart", param.iDisplayStart.ToString() }, { "DisplayLength", param.iDisplayLength.ToString() }, { "SearchParam", param.sSearch }, { "SortColumn", sortColumnIndex.ToString() }, { "SortDirection", sortDirection }, { "ClientID", clientId }, { "IsDone", isDone }, { "SelectedCarID", SelectCarID } }; // get all of data. var _ds = new Select().SelectLists("ClientCars_SelectList", _params); return(LZStringUpdated.compressToUTF16(_ds.GetXml())); }
public static object GetDataList(string actionName, string[] names, string[] values) { var _ds = new Select().SelectLists(actionName, names, values); // get all of data. return(LZStringUpdated.compressToUTF16(_ds.GetXml())); }