// art partial view Queries public ActionResult ART(string sdate, string edate, int?_emmergency) { bool?emergency = null; if (_emmergency == 1) { emergency = false; } else if (_emmergency == 2) { emergency = true; } ARTModels obj = new ARTModels(); DateTime? StartDate = DateTime.ParseExact(sdate, "dd/MM/yyyy", null); DateTime? EndDate = DateTime.ParseExact(edate, "dd/MM/yyyy", null); // obj.GetAll(StartDate, EndDate); //obj.EndDate = EndDate; Microsoft.Reporting.WebForms.ReportViewer reportViewer = new Microsoft.Reporting.WebForms.ReportViewer(); reportViewer.ProcessingMode = ProcessingMode.Local; reportViewer.SizeToReportContent = true; reportViewer.LocalReport.ReportPath = Request.MapPath(Request.ApplicationPath) + @"\Views\Queries\ART.rdlc"; reportViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("art", obj.GetAll(StartDate, EndDate, emergency).ToList())); ViewBag.ReportViewer = reportViewer; return(View()); }
public ActionResult GetOrder(Syncfusion.JavaScript.DataManager dm, int?param_fc, string param_sd, string param_ed) { //string a = start_date.ToString(); //string b = end_date.ToString(); ARTModels obj = new ARTModels(); //IEnumerable DataSource = obj.getOrders(18, DateTime.Parse("2017-04-01 00:00:00.000"), DateTime.Parse("2017-05-31 00:00:00.000")); context.Configuration.ProxyCreationEnabled = false; IEnumerable data = obj.GetOrder(System.Convert.ToInt32(param_fc), DateTime.Parse(param_sd), DateTime.Parse(param_ed)); int count = obj.GetOrder(System.Convert.ToInt32(param_fc), DateTime.Parse(param_sd), DateTime.Parse(param_ed)).Count(); DataOperations operation = new DataOperations(); //Performing filtering operation if (dm.Where != null) { data = operation.PerformWhereFilter(data, dm.Where, "and"); var filtered = (IEnumerable <object>)data; count = filtered.Count(); } //Performing search operation if (dm.Search != null) { data = operation.PerformSearching(data, dm.Search); var searched = (IEnumerable <object>)data; count = searched.Count(); } //Performing sorting operation if (dm.Sorted != null) { data = operation.PerformSorting(data, dm.Sorted); } //Performing paging operations if (dm.Skip != 0) { data = operation.PerformSkip(data, dm.Skip); } if (dm.Take != 0) { data = operation.PerformTake(data, dm.Take); } return(Json(new { result = data, count = count }, JsonRequestBehavior.AllowGet)); }
//public ActionResult DialogUpdateMAULT(Order_MAULT_Header value) //{ // OrderMAULTHeaderModels obj = new OrderMAULTHeaderModels(); // obj.OrderNumber = value.OrderNumber; // TempData["OrderNumber"] = value.OrderNumber; // obj.DatePrepared = System.Convert.ToDateTime(value.DatePrepared); // obj.FacilityCode = value.FacilityCode; // obj.DateExpected = value.DateExpected; // obj.OrderStatusId = 1; // obj.FinalSubmission = System.Convert.ToBoolean(value.FinalSubmission); // obj.EditedBy = new UserManagement().getCurrentuser(); // obj.EditedDate = DateTime.Now; // obj.Update(); // return Json(value, JsonRequestBehavior.AllowGet); //} public ActionResult GetOrderTestSummary(Syncfusion.JavaScript.DataManager dm, string param_on) { ARTModels obj = new ARTModels(); IEnumerable data = obj.GetOrderViralloadTestSummary(param_on); int count = obj.GetOrderViralloadTestSummary(param_on).Count(); DataOperations operation = new DataOperations(); //Performing filtering operation if (dm.Where != null) { data = operation.PerformWhereFilter(data, dm.Where, "and"); var filtered = (IEnumerable <object>)data; count = filtered.Count(); } //Performing search operation if (dm.Search != null) { data = operation.PerformSearching(data, dm.Search); var searched = (IEnumerable <object>)data; count = searched.Count(); } //Performing sorting operation if (dm.Sorted != null) { data = operation.PerformSorting(data, dm.Sorted); } //Performing paging operations if (dm.Skip != 0) { data = operation.PerformSkip(data, dm.Skip); } if (dm.Take != 0) { data = operation.PerformTake(data, dm.Take); } return(Json(new { result = data, count = count }, JsonRequestBehavior.AllowGet)); }