private void lblpdf_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(txtCodigo.Text) && lblOperacion.Text == "Consulta" && Encontro == true) { BLL.CompanyBLL bllComp = new BLL.CompanyBLL(); ECompany objC = bllComp.buscar(); DataTable dt = new DataTable(); dt = bllAct.informeBasico(txtCodigo.Text); Informes.FrmVerInforme frm = new Informes.FrmVerInforme(); ReportDocument reporte = new ReportDocument(); string ruta = AppDomain.CurrentDomain.BaseDirectory + "Reportes\\rptinfActBasico.rpt"; reporte.Load(ruta); reporte.SetDataSource(dt); // Asignacion de Parametros reporte.SetParameterValue("comp", objC.descripcion); reporte.SetParameterValue("nit", objC.nit); reporte.SetParameterValue("periodo", "Periodo Actual: " + BLL.Inicializar.periodo); frm.CReporte.ReportSource = reporte; frm.CReporte.Refresh(); frm.ShowDialog(); } else { MessageBox.Show("Seleccione un Activo (Valido O Registrado en el Sistem)", "SAE Control", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
public async Task <ActionResult> Post() { var companyUser = (CompanyUser)(await UserManager.FindByIdAsync(User.Identity.GetUserId())); var companyID = (int)companyUser.CompanyID; var job = new Job { CompanyID = companyID, }; using (CompanyBLL combll = new BLL.CompanyBLL()) job.Company = await combll.GetCompanyByIdAsync(companyUser.CompanyID.Value); return(View(job)); }
/// <summary> /// 获取服务预定相关信息 /// </summary> private void GetCall(HttpContext context) { var callId = context.Request.QueryString["callId"]; if (!string.IsNullOrEmpty(callId)) { var thisCall = new DAL.sdk_service_call_dal().FindNoDeleteById(long.Parse(callId)); if (thisCall != null) { var thisACcount = new BLL.CompanyBLL().GetCompany(thisCall.account_id); var startDate = Tools.Date.DateHelper.ConvertStringToDateTime(thisCall.start_time); var endDate = Tools.Date.DateHelper.ConvertStringToDateTime(thisCall.end_time); var durHours = ((decimal)thisCall.end_time - (decimal)thisCall.start_time) / 1000 / 60 / 60; context.Response.Write(new Tools.Serialize().SerializeJson(new { id = thisCall.id, startDateString = startDate.ToString("yyyy-MM-dd"), startTimeString = startDate.ToString("HH:mm"), endDateString = endDate.ToString("yyyy-MM-dd"), endTimeString = endDate.ToString("HH:mm"), durHours = durHours.ToString("#0.00"), accountName = thisACcount != null ? thisACcount.name : "", description = thisCall.description })); } } }
private void informe(string codigo) { BLL.CompanyBLL bllComp = new BLL.CompanyBLL(); ECompany objC = bllComp.buscar(); DataTable dt = new DataTable(); dt = bllAct.informeUbicacion(codigo, tPropiedad); Informes.FrmVerInforme frm = new Informes.FrmVerInforme(); ReportDocument reporte = new ReportDocument(); string ruta = AppDomain.CurrentDomain.BaseDirectory + "Reportes\\RptInfAreas.rpt"; reporte.Load(ruta); reporte.SetDataSource(dt); // Asignacion de Parametros reporte.SetParameterValue("comp", objC.descripcion); reporte.SetParameterValue("nit", objC.nit); reporte.SetParameterValue("periodo", "Periodo Actual: " + BLL.Inicializar.periodo); frm.CReporte.ReportSource = reporte; frm.CReporte.Refresh(); frm.ShowDialog(); }
private void parametros() { BLL.CompanyBLL bllComp = new BLL.CompanyBLL(); comp = bllComp.buscar(); }