/// <summary> /// ham thuc hien lay thong tin cua phan in bao cao hang ngay theo so luong /// kieu thu 3 cua phan loai report /// </summary> /// <param name="_dsReport"></param> /// <param name="strTestTypeId"></param> /// <param name="strObjectId"></param> /// <param name="strDoctorId"></param> private void GetDataReportVienmat(ref DataTable dtreportvm, DateTime fromdate, DateTime toDate, int noitru, string strObjectId, string strTestTypeId, string reporttype) { dtreportvm.Clear(); fromdate = dtpFromDate.Value; toDate = dtpTodate.Value; dtreportvm = ReportBusiness.ReportALlVnio(fromdate, toDate, noitru, strObjectId, strTestTypeId, reporttype); }
public byte[] CreaExcelBolleVendite(DateTime inizio, DateTime fine) { using (ReportBusiness bReport = new ReportBusiness()) bReport.FillBOLLE_VENDITA(inizio, fine, _ds); ExcelHelper eh = new ExcelHelper(); return(eh.BolleVenditaExcel(_ds)); }
public byte[] CreaExcelCaricoLavoro(string reparto) { using (ReportBusiness bReport = new ReportBusiness()) bReport.FillODL_APERTI(_ds, reparto); ExcelHelper eh = new ExcelHelper(); return(eh.CaricoLavoroExcel(_ds)); }
public byte[] CreaExcelReportQuantita() { using (ReportBusiness bReport = new ReportBusiness()) bReport.FillREPORTQUANTITA(_ds); ExcelHelper eh = new ExcelHelper(); return(eh.ReportQuantitaExcel(_ds)); }
private void GetAll() { try { dsDepartmentDoctor = ReportBusiness.GetAllDepartmentDoctorVnio(); } catch (Exception) { } }
public IHttpActionResult DealerFoPickedProductDetails(int stateid, int?districtid, int?dealerid, int?foId) { try { DataSet ds = new DataSet(); ds = ReportBusiness.FoPickedProductDetails(stateid, districtid, dealerid, foId); return(Ok(new { results = ds, Status = false })); } catch { return(Ok(new { results = "", Status = false })); } }
public frm_BAOCAO_SLUONG_KPHONG_GUI(string TitleReport) { InitializeComponent(); this.KeyPreview = true; ReportBusiness.CreateManagementUnit(); sTitleReport = TitleReport; cboHosStatus.SelectedIndex = 0; dtToDate.Value = dtCreateDate.Value = dtFromDate.Value = DateTime.Now; cboLoaiBaoCao.SelectedIndex = 0; }
public CustomerPresenter(ICustomerView view) { _businessOrder = new ReportBusiness(Singleton <PosEngine> .Instance.Resolve <IRepository <Order> >()); _business = new CustomerBusiness(Singleton <PosEngine> .Instance.Resolve <IRepository <Customer> >()); _view = view; Customer Customer = new Customer(); _model = new CustomerModel(new Customer()); _view.InitView(_model); }
private void FillDoctorVnio() { try { grdDoctor.AutoGenerateColumns = false; grdDoctor.DataSource = ReportBusiness.GetAllDoctorVnio(); } catch (Exception) { } }
private void FillObjectList() { try { grdObjectType.AutoGenerateColumns = false; grdObjectType.DataSource = ReportBusiness.GetAllObjectList(); } catch (Exception) { } }
public ReportPresenter(IReportView view) { _business = new ReportBusiness(Singleton <PosEngine> .Instance.Resolve <IRepository <Order> >()); _businessProduct = new ProductBusiness(Singleton <PosEngine> .Instance.Resolve <IRepository <Product> >()); _businessCustomer = new CustomerBusiness(Singleton <PosEngine> .Instance.Resolve <IRepository <Customer> >()); _view = view; _model = new ReportModel(); _view.InitView(_model); }
private void FillNOINGOAITRU() { try { grdNoiNgoaiTru.AutoGenerateColumns = false; grdNoiNgoaiTru.DataSource = ReportBusiness.GetAllDepartmentDoctorVnio().Tables[2]; } catch (Exception) { throw; } }
private void FillTestTypeList() { try { grdTestTypeList.AutoGenerateColumns = false; _Testtype = ReportBusiness.GetAllTestTypeList(); grdTestTypeList.DataSource = _Testtype; } catch (Exception) { throw; } }
// private string reparto; public List <CaricoRepartoModel> CreaListaCaricoReparto(string reparto) { List <CaricoRepartoModel> caricoLavoro = new List <CaricoRepartoModel>(); using (ReportBusiness bReport = new ReportBusiness()) bReport.FillODL_APERTI(_ds, reparto); foreach (ReportDS.ODL_APERTIRow odl_aperto in _ds.ODL_APERTI) { caricoLavoro.Add(CreaCaricoRepartoModel(odl_aperto)); } return(caricoLavoro); }
public List <ReportQuantitaModel> CreaListaReportQuantita() { List <ReportQuantitaModel> reportquantitalist = new List <ReportQuantitaModel>(); using (ReportBusiness bReport = new ReportBusiness()) bReport.FillREPORTQUANTITA(_ds); foreach (ReportDS.REPORTQUANTITARow reportquantita in _ds.REPORTQUANTITA) { reportquantitalist.Add(CreaReportQuantitaModel(reportquantita)); } return(reportquantitalist); }
public List <SaldoUbicazioneModel> CreaListaSaldoUbicazioneModel(string Articolo) { List <SaldoUbicazioneModel> lista = new List <SaldoUbicazioneModel>(); using (ReportBusiness bReport = new ReportBusiness()) bReport.FillSALDIUBICAZIONI(Articolo, _ds); foreach (ReportDS.SALDIUBICAZIONIRow riga in _ds.SALDIUBICAZIONI) { lista.Add(CreaSaldoUbicazioneModel(riga)); } return(lista); }
public List <BolleVenditaModel> CreaListaReportBolleVendita(DateTime inizio, DateTime fine) { List <BolleVenditaModel> lista = new List <BolleVenditaModel>(); using (ReportBusiness bReport = new ReportBusiness()) bReport.FillBOLLE_VENDITA(inizio, fine, _ds); foreach (ReportDS.BOLLE_VENDITARow riga in _ds.BOLLE_VENDITA) { lista.Add(CreaBolleVenditaModel(riga)); } return(lista); }
private void GetDataReportDailyDepartmentVnio(ref DataTable dtreportvm, DateTime fromdate, DateTime toDate, string strDepartment, string strTestTypeId) { try { dtreportvm.Clear(); fromdate = dtpFromDate.Value; toDate = dtpTodate.Value; dtreportvm = ReportBusiness.GetDataReportDailyDepartMentVnio(fromdate, toDate, strDepartment, strTestTypeId); } catch (Exception) { throw; } }
public object GetReportType() { try { ReportBusiness Objclass = new ReportBusiness(); var GetReport = Objclass.ReportInfo(); return(GetReport); } catch (Exception e) { return(new Error() { IsError = true, Message = e.Message }); } }
public IHttpActionResult MonthlyRent(int id, Int64 ticks) { var content = new Response <RentRate>(); try { using (var reportBusiness = new ReportBusiness()) { content = reportBusiness.RentRateMonthly(id, new DateTime(ticks)); } } catch (Exception ex) { content.isSuccess = false; content.Message += ex.Message; } return(new StandartResult <RentRate>(content, Request)); }
public IHttpActionResult DailyKmByRent(int userId, int rentId) { var content = new Response <DailyKmInfo>(); try { using (var reportBusiness = new ReportBusiness()) { content = reportBusiness.DailyKmReportByRentID(userId, rentId); } } catch (Exception ex) { content.isSuccess = false; content.Message += ex.Message; } return(new StandartResult <DailyKmInfo>(content, Request)); }
public IHttpActionResult OverKm(int id) { var content = new Response <OverKmInfo>(); try { using (var reportBusiness = new ReportBusiness()) { content = reportBusiness.OverKmInfo(id); } } catch (Exception ex) { content.isSuccess = false; content.Message += ex.Message; } return(new StandartResult <OverKmInfo>(content, Request)); }
public IHttpActionResult DownloadFoInvoice(string date, string districtId, string dName, string foId, string foName, string UID) { var fromOrderDate = Convert.ToDateTime(Convert.ToDateTime(date).AddDays(1).ToString("yyyy-MM-dd 00:00:00.000")); var toOrderDate = Convert.ToDateTime(Convert.ToDateTime(fromOrderDate).ToString("yyyy-MM-dd 23:59:59.000")); try { var filter = "From Date:- " + fromOrderDate.ToString() + " <br/>ToDate:- " + toOrderDate.ToString() + " <br/>DistrictName:- " + dName + "<br/> FoName:- " + foName; var filename = "Download Invoice By FO"; LogBusiness.DownloadHistoryLog(filter, filename, Convert.ToInt32(UID)); } catch { } // List<SP_PODDETAIL_v2_Result> sp_poddetail_v2_result = ClsHelper.GetPodData_V2("0", Convert.ToInt32(districtId), fromOrderDate, toOrderDate); var sp_poddetail_v2_result = ReportBusiness.GetPodFoDetailReport("0", 0, Convert.ToInt32(districtId), fromOrderDate, toOrderDate, Constant.INVOICE, Convert.ToInt32(foId)); foName = foName.Contains(' ') ? foName.Replace(' ', '_') : foName; return(Ok(sp_poddetail_v2_result)); }
public IHttpActionResult GetFoUserOrderList(string date, string districtId, string dName, string foId, string foName, string UID) { try { var fromOrderDate = Convert.ToDateTime(Convert.ToDateTime(date).AddDays(1).ToString("yyyy-MM-dd 00:00:00.000")); var toOrderDate = Convert.ToDateTime(Convert.ToDateTime(fromOrderDate).ToString("yyyy-MM-dd 23:59:59.000")); try { var filter = "From Date:- " + fromOrderDate.ToString() + " <br/>ToDate:- " + toOrderDate.ToString() + " <br/>DistrictName:- " + dName + "<br/> FoName:- " + foName; var filename = "Download TripSheet By Fo"; LogBusiness.DownloadHistoryLog(filter, filename, Convert.ToInt32(UID)); } catch { } dName = dName.Contains(' ') ? dName.Replace(' ', '_') : dName; foName = foName.Contains(' ') ? foName.Replace(' ', '_') : foName; var msg = string.Empty; // var list = ClsHelper.GetDistributorOrderList(fromOrderDate, toOrderDate, Convert.ToInt32(districtId), Convert.ToInt32(distributorId)); var list = ReportBusiness.GetFoByOrderSheetDetails(fromOrderDate, toOrderDate, Convert.ToInt32(districtId), Convert.ToInt32(foId)); var sp_poddetail_v2_result = ReportBusiness.GetPodFoDetailReport("0", 0, Convert.ToInt32(districtId), fromOrderDate, toOrderDate, Constant.INVOICE, Convert.ToInt32(foId)); List <ListItem> objList = new List <ListItem>(); ListItem obj = new ListItem(); obj.FoOrderSheetDetail = list; obj.PodDetailReport = sp_poddetail_v2_result; objList.Add(obj); if (list.Count > 0) { //var pasgeSize = Convert.ToString(ConfigurationManager.AppSettings["pageSize"]); //string strPOD = RenderRazorViewToString(this.ControllerContext, "_TripSheetWithFo", list); } return(Ok(new { results = objList, Status = true })); } catch { return(Ok(new { results = "", Status = false })); } }
protected void UpdateParking_SelectedIndexChange(object sender, EventArgs e) { ReportBusiness rb = new ReportBusiness(); Session["REPORTLIST"] = rb.getUsersAndProfesors(Int32.Parse(DropDownListYearReport.SelectedValue)); }
public frm_BAOCAO_SL_BN_NHANGUI_MAU() { InitializeComponent(); ReportBusiness.CreateManagementUnit(); Utility.loadIconToForm(this); }
protected void Page_Load(object sender, EventArgs e) { FillDropDownListYearReport(); ReportBusiness rb = new ReportBusiness(); Session["REPORTLIST"] = rb.getUsersAndProfesors(2015); }
public List <string> EstraiReportQuantita() { using (ReportBusiness bReport = new ReportBusiness()) return(bReport.EstraiReportQuantita(_ds)); }
public frm_DONGANH() { InitializeComponent(); ReportBusiness.CreateManagementUnit(); }
public List <OrdiniAttiviModel> CreaListaOrdiniAttivitModel() { List <OrdiniAttiviModel> lista = new List <OrdiniAttiviModel>(); using (ReportBusiness bReport = new ReportBusiness()) bReport.FillORDINIATTIVI(_ds); decimal valoreTotale = _ds.ORDINIATTIVI.Sum(x => x.VALORENOSPE); decimal valoreTotaleScaduti = _ds.ORDINIATTIVI.Where(x => x.SCADUTO == "SI").Sum(x => x.VALORENOSPE); List <string> segnalatori = _ds.ORDINIATTIVI.Where(x => !x.IsSEGNALATORENull()).Select(x => x.SEGNALATORE).Distinct().ToList(); foreach (string segnalatore in segnalatori) { decimal valore = _ds.ORDINIATTIVI.Where(x => !x.IsSEGNALATORENull() && x.SEGNALATORE == segnalatore).Sum(x => x.VALORE); decimal quantita = _ds.ORDINIATTIVI.Where(x => !x.IsSEGNALATORENull() && x.SEGNALATORE == segnalatore).Sum(x => x.QTATOT); decimal valoreAnnullato = _ds.ORDINIATTIVI.Where(x => !x.IsSEGNALATORENull() && x.SEGNALATORE == segnalatore).Sum(x => x.VALOREANN); decimal quantitaAnnullato = _ds.ORDINIATTIVI.Where(x => !x.IsSEGNALATORENull() && x.SEGNALATORE == segnalatore).Sum(x => x.QTAANN); decimal valoreNonSpedito = _ds.ORDINIATTIVI.Where(x => !x.IsSEGNALATORENull() && x.SEGNALATORE == segnalatore).Sum(x => x.VALORENOSPE); decimal quantitaNonSpedita = _ds.ORDINIATTIVI.Where(x => !x.IsSEGNALATORENull() && x.SEGNALATORE == segnalatore).Sum(x => x.QTANOSPE); decimal valoreNonSpeditoScaduto = _ds.ORDINIATTIVI.Where(x => !x.IsSEGNALATORENull() && x.SEGNALATORE == segnalatore && x.SCADUTO == "SI").Sum(x => x.VALORENOSPE); decimal quantitaNonSpeditaScaduto = _ds.ORDINIATTIVI.Where(x => !x.IsSEGNALATORENull() && x.SEGNALATORE == segnalatore && x.SCADUTO == "SI").Sum(x => x.QTANOSPE); decimal valoreNonSpeditoNonScaduto = _ds.ORDINIATTIVI.Where(x => !x.IsSEGNALATORENull() && x.SEGNALATORE == segnalatore && x.SCADUTO == "NO").Sum(x => x.VALORENOSPE); decimal quantitaNonSpeditaNonScaduto = _ds.ORDINIATTIVI.Where(x => !x.IsSEGNALATORENull() && x.SEGNALATORE == segnalatore && x.SCADUTO == "NO").Sum(x => x.QTANOSPE); decimal scadutoPerCliente = valoreNonSpedito == 0 ? 0 : Math.Round(valoreNonSpeditoScaduto / valoreNonSpedito, 2) * 100; decimal scadutoSulTotale = valoreTotaleScaduti == 0 ? 0 : Math.Round(valoreNonSpeditoScaduto / valoreTotaleScaduti, 2) * 100; OrdiniAttiviModel ordineAttivoModel = new OrdiniAttiviModel(); ordineAttivoModel.Cliente = segnalatore; ordineAttivoModel.Quantita = quantita; ordineAttivoModel.QuantitaNonSpedita = quantitaNonSpedita; ordineAttivoModel.QuantitaAnnullata = quantitaAnnullato; ordineAttivoModel.QuantitaScaduta = quantitaNonSpeditaScaduto; ordineAttivoModel.Valore = valore; ordineAttivoModel.ValoreNonSpedito = valoreNonSpedito; ordineAttivoModel.ValoreAnnullato = valoreAnnullato; ordineAttivoModel.ValoreScaduto = valoreNonSpeditoScaduto; ordineAttivoModel.ValoreNonScaduto = valoreNonSpeditoNonScaduto; ordineAttivoModel.PercScadutoCliente = scadutoPerCliente; ordineAttivoModel.PercScadutoSulTotale = scadutoSulTotale; lista.Add(ordineAttivoModel); } //foreach (string cliente in _ds.ORDINIATTIVI.Where(x => x.IsSEGNALATORENull()).Select(x => x.SEGNALATORE)) //{ // decimal valore = _ds.ORDINIATTIVI.Where(x => x.CLIENTE == cliente).Sum(x => x.VALORE); // decimal quantita = _ds.ORDINIATTIVI.Where(x => x.CLIENTE == cliente).Sum(x => x.QTATOT); // decimal valoreAnnullato = _ds.ORDINIATTIVI.Where(x => x.CLIENTE == cliente).Sum(x => x.VALOREANN); // decimal quantitaAnnullato = _ds.ORDINIATTIVI.Where(x => x.CLIENTE == cliente).Sum(x => x.QTAANN); // decimal valoreNonSpedito = _ds.ORDINIATTIVI.Where(x => x.CLIENTE == cliente).Sum(x => x.VALORENOSPE); // decimal quantitaNonSpedita = _ds.ORDINIATTIVI.Where(x => x.CLIENTE == cliente).Sum(x => x.QTANOSPE); // decimal valoreNonSpeditoScaduto = _ds.ORDINIATTIVI.Where(x => x.CLIENTE == cliente && x.SCADUTO == "SI").Sum(x => x.VALORENOSPE); // decimal quantitaNonSpeditaScaduto = _ds.ORDINIATTIVI.Where(x => x.CLIENTE == cliente && x.SCADUTO == "SI").Sum(x => x.QTANOSPE); // decimal valoreNonSpeditoNonScaduto = _ds.ORDINIATTIVI.Where(x => x.CLIENTE == cliente && x.SCADUTO == "NO").Sum(x => x.VALORENOSPE); // decimal quantitaNonSpeditaNonScaduto = _ds.ORDINIATTIVI.Where(x => x.CLIENTE == cliente && x.SCADUTO == "NO").Sum(x => x.QTANOSPE); // decimal scadutoPerCliente = valoreNonSpedito == 0 ? 0 : Math.Round(valoreNonSpeditoScaduto / valoreNonSpedito, 2) * 100; // decimal scadutoSulTotale = valoreTotaleScaduti == 0 ? 0 : Math.Round(valoreNonSpeditoScaduto / valoreTotaleScaduti, 2) * 100; // OrdiniAttiviModel ordineAttivoModel = new OrdiniAttiviModel(); // ordineAttivoModel.Cliente = cliente; // ordineAttivoModel.Quantita = quantita; // ordineAttivoModel.QuantitaNonSpedita = quantitaNonSpedita; // ordineAttivoModel.QuantitaAnnullata = quantitaAnnullato; // ordineAttivoModel.Valore = valore; // ordineAttivoModel.ValoreNonSpedito = valoreNonSpedito; // ordineAttivoModel.ValoreAnnullato = valoreAnnullato; // ordineAttivoModel.ValoreScaduto = valoreNonSpeditoScaduto; // ordineAttivoModel.ValoreNonScaduto = valoreNonSpeditoNonScaduto; // ordineAttivoModel.PercScadutoCliente = scadutoPerCliente; // ordineAttivoModel.PercScadutoSulTotale = scadutoSulTotale; // lista.Add(ordineAttivoModel); //} return(lista); }
public frm_GTVT_BAOCAO_SOLUONG_XN_THEOKHOA() { InitializeComponent(); ReportBusiness.CreateManagementUnit(); }
public FrmReportAll_VNIO() { InitializeComponent(); ReportBusiness.CreateManagementUnit(); }