public object search(searchdata sd) { var a = DB.Order_Details.Where(x => x.Order.OrderDate >= sd.startdate && x.Order.OrderDate <= sd.enddate).Select(K => new { orderid = K.OrderID, employeeID = K.Order.EmployeeID, employeername = K.Order.Employee.FirstName, orderDate = K.Order.OrderDate, shipAddress = K.Order.ShipAddress, price = K.UnitPrice, quantity = K.Quantity }).ToList(); return(a); }
// [Route("search")] //[HttpPost] //public IEnumerable<Employee> search(searchdata sd) //{ // dynamic a = db.Usp_Empsearch(sd.startdate, sd.enddate); // return a; //} /// <summary> /// search Data between two dates /// </summary> /// <param name="sd"></param> /// <returns></returns> public object search(searchdata sd) { try { if (sd != null) { var a = db.Usp_Empsearch(sd.startdate, sd.enddate); return(a); } else { throw new HttpException(400, "Bad Request"); } } catch (Exception) { throw; } }
public void BeginSearchAsync(string searchTerm, DateTime startTimeUtc, int maxResults, object extraInfo, Action <DateTime, IEnumerable <object> > whenDone) { var data = new searchdata() { extra = extraInfo, max = maxResults, searchTerm = searchTerm, startTimeUtc = startTimeUtc, whendone = whenDone }; lock (LockObject) { BackgroundWorker wrk = new BackgroundWorker(); wrk.DoWork += new DoWorkEventHandler(wrk_DoWork); wrk.RunWorkerCompleted += new RunWorkerCompletedEventHandler(wrk_RunWorkerCompleted); activesearches.Add(data, wrk); wrk.RunWorkerAsync(data); } }
public object search(searchdata sd) { try { var a = db2.Usp_Empsearch(sd.startdate, sd.enddate); return(a); } catch (Exception ex) { return(new Response { Status = "Error", Message = ex.StackTrace }); } }
public object search(searchdata sd) { var a = DB.BUS_SEARCH(sd.Source, sd.Destination); return(a); }
public object search(searchdata sd) { var a = DB.proc_finalflightsearch(sd.SourceFlight, sd.Destination); return(a); }