Пример #1
0
        public string exportdetailsqueryresults(string start_time, string end_time, string hide_cols)
        {
            string response = "";

            try
            {
                DateTime      start = DateTime.Parse(start_time);
                DateTime      end   = DateTime.Parse(end_time);
                List <_cases> list  = (from t in db_context.cases
                                       where t.report_time >= start && t.report_time <= end
                                       select new _cases()
                {
                    insurant_name = t.insurant_name,
                    insurant_habitation = t.insurant_habitation,
                    accident_time = t.accident_time,
                    is_reported = t.is_reported,
                    is_submit = t.is_submit,
                    report_time = t.report_time,
                    hospital_type = t.hospital_type,
                    invoice_amount = t.invoice_amount,
                    deductible_amount = t.deductible_amount,
                    subtract_amount = t.subtract_amount,
                    compensation_type = t.compensation_type,
                    compensation_amount = t.compensation_amount,
                    current_state = t.current_state
                }).ToList();
                FileOperate file_oper = new FileOperate();
                response = file_oper.ExportDetailsQueryResults(start, end, list, hide_cols);
            }
            catch (Exception ex)
            {
                response = ex.Message;
                throw ex;
            }

            return(response);
        }
Пример #2
0
        public string exportdetailsqueryresults(string start_time, string end_time, string hide_cols)
        {
            string response = "";

            try
            {
                DateTime start = DateTime.Parse(start_time);
                DateTime end = DateTime.Parse(end_time);
                List<_cases> list = (from t in db_context.cases
                              where t.report_time >= start && t.report_time <= end
                              select new _cases()
                              {
                                  insurant_name = t.insurant_name,
                                  insurant_habitation = t.insurant_habitation,
                                  accident_time = t.accident_time,
                                  is_reported = t.is_reported,
                                  is_submit = t.is_submit,
                                  report_time = t.report_time,
                                  hospital_type = t.hospital_type,
                                  invoice_amount = t.invoice_amount,
                                  deductible_amount = t.deductible_amount,
                                  subtract_amount = t.subtract_amount,
                                  compensation_type = t.compensation_type,
                                  compensation_amount = t.compensation_amount,
                                  current_state = t.current_state
                              }).ToList();
                FileOperate file_oper = new FileOperate();
                response = file_oper.ExportDetailsQueryResults(start, end, list, hide_cols);
            }
            catch (Exception ex)
            {
                response = ex.Message;
                throw ex;
            }

            return response;
        }