public static object LoadData() { var param = new jQueryDataTableParamModel(); HttpContext Context = HttpContext.Current; param.sEcho = String.IsNullOrEmpty(Context.Request["sEcho"]) ? 0 : Convert.ToInt32(Context.Request["sEcho"]); var auctionTypeID = String.IsNullOrEmpty(Context.Request["AuctionTypeID"]) ? "0" : Context.Request["AuctionTypeID"]; string pID = String.IsNullOrEmpty(Context.Request["PID"]) ? null : Context.Request["PID"], 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 = { { "AuctionTypeID", auctionTypeID }, { "From", fromDate }, { "To", toDate }, { "ID", pID } }; // get all of data. var _ds = new Select().SelectLists("AuctionCommissions_SelectCars", _params); // inhance data to be list. var rows = DataUtilities.ConvertDTToList(_ds.Tables[0]); return(new { sEcho = param.sEcho, iTotalRecords = _ds.Tables[1].Rows[0][0], iTotalDisplayRecords = _ds.Tables[1].Rows[0][0], aaData = rows.ToList() }); }
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"]); var ids = Context.Request["id"]; // create filter paramters string[,] _params = { { "id", ids } }; // get all of data. var _ds = new Select().SelectLists("Booking_SelectCars", _params); // 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 ClientCars4Sale() { var 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"]; 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 }, { "ClientID", SessionManager.Current.ID } }; // get all of data. var _ds = new Select().SelectLists("ClientCars_SelectList4Sale", _params); // inhance data to be list. var rows = DataUtilities.ConvertDTToList(_ds.Tables[0]); var data = new { 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.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 // create filter paramters string[,] _params = { { "DisplayStart", param.iDisplayStart.ToString() }, { "DisplayLength", param.iDisplayLength.ToString() }, { "SortColumn", sortColumnIndex.ToString() }, { "SortDirection", sortDirection } }; // get all of data. var _ds = new Select().SelectLists("CarsToActive_SelectList", _params); // 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 GetShippInvoicesDetails() { jQueryDataTableParamModel param = new jQueryDataTableParamModel(); HttpContext Context = HttpContext.Current; param.sEcho = String.IsNullOrEmpty(Context.Request["sEcho"]) ? 0 : Convert.ToInt32(Context.Request["sEcho"]); var _id = Context.Request["id"]; var bol = Context.Request["bol"]; var container = Context.Request["container"]; string[,] parm = { { "ID", _id } }; var ds = new Select().SelectLists("ShippInvoicesDetails_SelectItems", parm); // inhance data to be list. var rows = DataUtilities.ConvertDTToList(ds.Tables[0]); // Our last var data = new { sEcho = param.sEcho, iTotalRecords = ds.Tables[0].Rows.Count, iTotalDisplayRecords = ds.Tables[0].Rows.Count, aaData = rows }; return(data); }
public static object GetShipInvoicePayments() { 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"]); param.sSearch = String.IsNullOrEmpty(Context.Request["sSearch"]) ? "" : Context.Request["sSearch"]; var ShipCompanyID = String.IsNullOrEmpty(Context.Request["ShipCompanyID"]) ? "" : Context.Request["ShipCompanyID"]; var _type = String.IsNullOrEmpty(Context.Request["Type"]) ? "0" : Context.Request["Type"]; var sortColumnIndex = Convert.ToInt32(Context.Request["iSortCol_0"]); var sortDirection = Context.Request["sSortDir_0"]; // asc or desc SqlCommand command = DataAccess.CreateCommand(); command.CommandText = "ShipInvoicePayments_SelectList"; try { command.Connection.Open(); command.Parameters.AddWithValue("@DisplayStart", param.iDisplayStart); command.Parameters.AddWithValue("@DisplayLength", param.iDisplayLength); command.Parameters.AddWithValue("@SearchParam", param.sSearch); command.Parameters.AddWithValue("@SortColumn", sortColumnIndex); command.Parameters.AddWithValue("@SortDirection", sortDirection); command.Parameters.AddWithValue("@ShipCompanyID", ShipCompanyID); command.Parameters.AddWithValue("@Type", _type); SqlDataAdapter adp = new SqlDataAdapter(command); DataSet ds = new DataSet(); adp.Fill(ds); 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); } catch (Exception ex) { throw ex; } finally { command.Connection.Close(); } }
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"]) ? 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 shipperFilter = String.IsNullOrEmpty(Context.Request["Shipper"]) ? null : Context.Request["Shipper"]; var Distination = String.IsNullOrEmpty(Context.Request["Distination"]) ? null : Context.Request["Distination"]; 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() }, //{"SearchParam", param.sSearch}, { "SortColumn", sortColumnIndex.ToString() }, { "SortDirection", sortDirection }, { "From", fromDate }, { "To", toDate }, { "Shipper", shipperFilter }, { "Distination", Distination } }; // get all of data. var _ds = new Select().SelectLists("ShippInvoices_RatesList", _params); // 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 GetCarsData() { 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"]); var sortDirection = Context.Request["sSortDir_0"];// asc or desc var isScrap = Context.Request["type"] ?? "0"; // custome search var sKey = Context.Request["searchKey"] ?? null; var sType = Context.Request["searchType"] ?? null; if (!string.IsNullOrEmpty(sType)) { param.sSearch = sKey; } // create filter paramters string[,] _params = { { "DisplayStart", param.iDisplayStart.ToString() }, { "DisplayLength", param.iDisplayLength.ToString() }, { "SortColumn", sortColumnIndex.ToString() }, { "SearchParam", param.sSearch }, { "SortDirection", sortDirection },{ "IsScrap", isScrap }, { "SearchType", sType } }; // get all of data. var _ds = new Select().SelectLists("CarsData_SelectCarsList", _params); // 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 LoadPayments() { 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 param.sSearch = String.IsNullOrEmpty(Context.Request["sSearch"]) ? "" : Context.Request["sSearch"]; //var clientID = String.IsNullOrEmpty(Context.Request["ClientID"]) ? "" : Context.Request["ClientID"]; var customCo = String.IsNullOrEmpty(Context.Request["CustomCo"]) ? "" : Context.Request["CustomCo"]; string from = String.IsNullOrEmpty(Context.Request["From"]) ? null : Convert.ToDateTime(Context.Request["From"]).ToShortDateString(); string to = String.IsNullOrEmpty(Context.Request["To"]) ? null : Convert.ToDateTime(Context.Request["To"]).ToShortDateString(); // create filter paramters string[,] _params = { { "DisplayStart", param.iDisplayStart.ToString() }, { "DisplayLength", param.iDisplayLength.ToString() }, { "SearchParam", param.sSearch }, { "SortColumn", sortColumnIndex.ToString() }, { "SortDirection", sortDirection }, { "ClientID", SessionManager.Current.ID }, { "CustomID", customCo },{ "From", from }, { "To", to } }; // get all of data. var _ds = new Select().SelectLists("ClientsPayments_SelectList", _params); // 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 GetCustomspaymentsmaster() { 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"]); var sortDirection = Context.Request["sSortDir_0"];// asc or desc var CustomsCompanyID = String.IsNullOrEmpty(Context.Request["CustomsCompanyID"]) ? "" : Context.Request["CustomsCompanyID"]; var _type = String.IsNullOrEmpty(Context.Request["Type"]) ? "0" : Context.Request["Type"]; // create filter paramters string[,] _params = { { "DisplayStart", param.iDisplayStart.ToString() }, { "DisplayLength", param.iDisplayLength.ToString() }, { "SearchParam", param.sSearch }, { "SortColumn", sortColumnIndex.ToString() }, { "SortDirection", sortDirection }, { "CustomsCompanyID", CustomsCompanyID }, { "Type", _type } }; // get all of data. var _ds = new Select().SelectLists("Customspaymentsmaster_SelectList", _params); // 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.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 string clientId = Context.Request["ClientID"] ?? null, paid = Context.Request["paid"] ?? null, 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 }, { "ClientID", clientId }, { "From", fromDate },{ "To", toDate }, { "Paid", paid } }; // get all of data. var _ds = new Select().SelectLists("PartsInvoices_SelectList", _params); // enhance 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 GetData(string ShipCompanyID) { if (string.IsNullOrEmpty(ShipCompanyID)) { ShipCompanyID = "0"; } // default value string[,] pram = { { "ShipCompanyID", ShipCompanyID } }; var ds = new Select().SelectLists("CarsWaitedshipReport_FillReport", pram); // inhance data to be list. var rows = DataUtilities.ConvertDTToList(ds.Tables[0]); // return rows.ToList(); var serializer = new JavaScriptSerializer(); var serializedResult = serializer.Serialize(rows); string[] FormulaValues = new string[3]; FormulaValues[0] = ShipCompanyID; object data = new { FormulaValues = FormulaValues, serializdata = serializedResult }; return(data); }