private void bindServiceTypes() { if (Session["ComingFromAllClaims"] != null) { pnlEditService.Visible = true; var proID = Session["CarrierInvoiceID"]; int clientID = SessionHelper.getClientId(); List <InvoiceServiceType> invoiceServiceTypes = null; //set todays date to activity date var today = System.DateTime.Now; txtServiceDate.Value = today; //using (Repository.InvoiceServiceTypeManager repository = new Repository.InvoiceServiceTypeManager()) { // invoiceServiceTypes = repository.GetAll(clientID).ToList(); //} using (Repository.InvoiceServiceTypeManager repository = new Repository.InvoiceServiceTypeManager()) { invoiceServiceTypes = repository.GetAll(Convert.ToInt32(proID)).ToList(); } Core.CollectionManager.FillCollection(ddlInvoiceServiceType, "ServiceTypeID", "ServiceDescription", invoiceServiceTypes); Session["ServiceCount"] = ddlInvoiceServiceType.Items.Count; } else { var proID = Session["InvoiceProfileID"]; // <~~ this will be used to pass the selected invoice profile ID //(as a parameter) over into the new GetAll() function that we'll be creating today.! int clientID = SessionHelper.getClientId(); List <InvoiceServiceType> invoiceServiceTypes = null; //using (Repository.InvoiceServiceTypeManager repository = new Repository.InvoiceServiceTypeManager()) { // invoiceServiceTypes = repository.GetAll(clientID).ToList(); //} using (Repository.InvoiceServiceTypeManager repository = new Repository.InvoiceServiceTypeManager()) { invoiceServiceTypes = repository.GetAll(Convert.ToInt32(proID)).ToList(); } Core.CollectionManager.FillCollection(ddlInvoiceServiceType, "ServiceTypeID", "ServiceDescription", invoiceServiceTypes); Session["ServiceCount"] = ddlInvoiceServiceType.Items.Count; } }
private void bindServiceTypes() { if (Session["ComingFromAllClaims"] != null) { pnlEditService.Visible = true; var proID = Session["CarrierInvoiceID"]; int clientID = SessionHelper.getClientId(); List<InvoiceServiceType> invoiceServiceTypes = null; //set todays date to activity date var today = System.DateTime.Now; txtServiceDate.Value = today; //using (Repository.InvoiceServiceTypeManager repository = new Repository.InvoiceServiceTypeManager()) { // invoiceServiceTypes = repository.GetAll(clientID).ToList(); //} using (Repository.InvoiceServiceTypeManager repository = new Repository.InvoiceServiceTypeManager()) { invoiceServiceTypes = repository.GetAll(Convert.ToInt32(proID)).ToList(); } Core.CollectionManager.FillCollection(ddlInvoiceServiceType, "ServiceTypeID", "ServiceDescription", invoiceServiceTypes); Session["ServiceCount"] = ddlInvoiceServiceType.Items.Count; } else { var proID = Session["InvoiceProfileID"]; // <~~ this will be used to pass the selected invoice profile ID //(as a parameter) over into the new GetAll() function that we'll be creating today.! int clientID = SessionHelper.getClientId(); List<InvoiceServiceType> invoiceServiceTypes = null; //using (Repository.InvoiceServiceTypeManager repository = new Repository.InvoiceServiceTypeManager()) { // invoiceServiceTypes = repository.GetAll(clientID).ToList(); //} using (Repository.InvoiceServiceTypeManager repository = new Repository.InvoiceServiceTypeManager()) { invoiceServiceTypes = repository.GetAll(Convert.ToInt32(proID)).ToList(); } Core.CollectionManager.FillCollection(ddlInvoiceServiceType, "ServiceTypeID", "ServiceDescription", invoiceServiceTypes); Session["ServiceCount"] = ddlInvoiceServiceType.Items.Count; } }
private void bindServiceTypes() { int clientID = SessionHelper.getClientId(); List<InvoiceServiceType> invoiceServiceTypes = null; using (Repository.InvoiceServiceTypeManager repository = new Repository.InvoiceServiceTypeManager()) { invoiceServiceTypes = repository.GetAll(clientID).ToList(); } Core.CollectionManager.FillCollection(ddlInvoiceServiceType, "ServiceTypeID", "ServiceDescription", invoiceServiceTypes); }