protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e) { // weonly process commands with a datasource (our image buttons) if (e.CommandSource == null) { return; } string typeOfControl = e.CommandSource.GetType().ToString(); if (typeOfControl.Equals("System.Web.UI.WebControls.ImageButton")) { int id = 0; ImageButton imgb = (ImageButton)e.CommandSource; if (imgb.ID != "New" && imgb.ID != "Exit") { id = (int)e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex][e.Item.OwnerTableView.DataKeyNames[0]]; } switch (imgb.ID) { case "Select": break; case "Edit": break; case "Delete": Customer cus = CntAriCli.GetCustomer(id, ctx); CntAriCli.DeleteCustomer(cus, ctx); RefreshGrid(); break; } } }
protected void Page_Load(object sender, EventArgs e) { // First control the type of parent page if (Request.QueryString["HcId"] != null) { hcId = Int32.Parse(Request.QueryString["HcId"]); hc = CntAriCli.GetHealthCompany(ctx); caller = "hccom"; // Called by a Healthcare Company } if (Request.QueryString["ClinicId"] != null) { clinicId = Int32.Parse(Request.QueryString["ClinicId"]); cl = CntAriCli.GetClinic(clinicId, ctx); caller = "clinic"; // Called by a Healthcare Company } if (Request.QueryString["PatientId"] != null) { patientId = Int32.Parse(Request.QueryString["PatientId"]); pat = CntAriCli.GetPatient(patientId, ctx); caller = "patient"; } if (Request.QueryString["CustomerId"] != null) { customerId = Int32.Parse(Request.QueryString["CustomerId"]); cus = CntAriCli.GetCustomer(customerId, ctx); caller = "customer"; } if (Request.QueryString["ProfessionalId"] != null) { professionalId = Int32.Parse(Request.QueryString["ProfessionalId"]); prof = CntAriCli.GetProfessional(professionalId, ctx); caller = "professional"; } }
protected void Page_Init(object sender, EventArgs e) { ctx = new AriClinicContext("AriClinicContext"); // security control, it must be a user logged if (Session["User"] == null) { Response.Redirect("Default.aspx"); } else { user = CntAriCli.GetUser((Session["User"] as User).UserId, ctx); Process proc = (from p in ctx.Processes where p.Code == "scat" select p).FirstOrDefault <Process>(); per = CntAriCli.GetPermission(user.UserGroup, proc, ctx); } // cheks if is call from another form if (Request.QueryString["Type"] != null) { type = Request.QueryString["Type"]; } // read patient information if (Request.QueryString["CustomerId"] != null) { customerId = Int32.Parse(Request.QueryString["CustomerId"]); cus = CntAriCli.GetCustomer(customerId, ctx); lblTitle.Text = String.Format("Historial administrativo: {0}", cus.FullName); this.Title = String.Format("Historial administrativo: {0}", cus.FullName); } }
protected void Page_Init(object sender, EventArgs e) { ctx = new AriClinicContext("AriClinicContext"); // security control, it must be a user logged if (Session["User"] == null) { Response.Redirect("Default.aspx"); } else { user = CntAriCli.GetUser((Session["User"] as User).UserId, ctx); Process proc = (from p in ctx.Processes where p.Code == "patient" select p).FirstOrDefault <Process>(); per = CntAriCli.GetPermission(user.UserGroup, proc, ctx); btnAccept.Visible = per.Modify; } // if (Request.QueryString["CustomerId"] != null) { customerId = Int32.Parse(Request.QueryString["CustomerId"]); cus = CntAriCli.GetCustomer(customerId, ctx); LoadData(cus); } else { LoadInsuranceCombo(null); } }
protected void UnloadData(AnestheticServiceNote asn) { asn.ServiceNoteDate = (DateTime)rddpServiceNoteDate.SelectedDate; clinicId = Int32.Parse(rdcbClinic.SelectedValue); asn.Clinic = CntAriCli.GetClinic(clinicId, ctx); asn.User = CntAriCli.GetUser(user.UserId, ctx); // decimal tt = 0; decimal.TryParse(txtTotal.Text, out tt); asn.Total = tt; // asn.Chk1 = chkChecked.Checked; asn.Chk2 = chkCkecked2.Checked; asn.Chk3 = chkChecked3.Checked; //customerId = Int32.Parse(txtCustomerId.Text); asn.Customer = CntAriCli.GetCustomer(int.Parse(rdcComercialName.SelectedValue), ctx); if (rdcProfessionalName.SelectedValue != "") { professionalId = Int32.Parse(rdcProfessionalName.SelectedValue); asn.Professional = CntAriCli.GetProfessional(professionalId, ctx); } else { asn.Professional = null; } if (rdcSurgeonName.SelectedValue != "") { surgeonId = Int32.Parse(rdcSurgeonName.SelectedValue); asn.Surgeon = CntAriCli.GetProfessional(surgeonId, ctx); } else { asn.Surgeon = null; } asn.Procedures.Clear(); ctx.SaveChanges(); //ctx.Delete(asn.Procedures); if (rdcProcedureName1.SelectedValue != "") { procedureId = Int32.Parse(rdcProcedureName1.SelectedValue); asn.Procedures.Add(CntAriCli.GetProcedure(procedureId, ctx)); } if (rdcProcedureName2.SelectedValue != "") { procedureId = Int32.Parse(rdcProcedureName2.SelectedValue); asn.Procedures.Add(CntAriCli.GetProcedure(procedureId, ctx)); } if (rdcProcedureName3.SelectedValue != "") { procedureId = Int32.Parse(rdcProcedureName3.SelectedValue); asn.Procedures.Add(CntAriCli.GetProcedure(procedureId, ctx)); } }
protected void UnloadData(Invoice inv) { inv.Serial = txtInvoiceSerial.Text; inv.Year = Int32.Parse(txtYear.Text); if (inv.InvoiceNumber == 0) { inv.InvoiceNumber = CntAriCli.GetNextInvoiceNumber(inv.Serial, inv.Year, ctx); } inv.InvoiceDate = (DateTime)rddpInvoiceDate.SelectedDate; customerId = Int32.Parse(txtCustomerId.Text); inv.Customer = CntAriCli.GetCustomer(customerId, ctx); inv.Total = CntAriCli.GetInvoiceTotal(inv); txtInvoiceTotal.Text = String.Format("{0:####,#0.00}", inv.Total); inv.InvoiceKey = String.Format("{0}-{1:000000}-{2}", inv.Year, inv.InvoiceNumber, inv.Serial); }
protected void UnloadData(AmendmentInvoice aInv) { aInv.Serial = txtInvoiceSerial.Text; aInv.Year = Int32.Parse(txtYear.Text); if (aInv.InvoiceNumber == 0) { aInv.InvoiceNumber = CntAriCli.GetNextInvoiceNumber(aInv.Serial, aInv.Year, ctx); } aInv.InvoiceDate = (DateTime)rddpInvoiceDate.SelectedDate; customerId = Int32.Parse(txtCustomerId.Text); aInv.Customer = CntAriCli.GetCustomer(customerId, ctx); aInv.Reason = txtReason.Text; aInv.Total = CntAriCli.GetAmendmentInvoiceTotal(aInv); txtInvoiceTotal.Text = String.Format("{0:####,#0.00}", aInv.Total); aInv.InvoiceKey = String.Format("{0}-{1:000000}-{2}", aInv.Year, aInv.InvoiceNumber, aInv.Serial); }
protected void txtCustomerId_TextChanged(object sender, EventArgs e) { // search for a Customer customerId = Int32.Parse(txtCustomerId.Text); cus = CntAriCli.GetCustomer(customerId, ctx); if (cus != null) { txtCustomerId.Text = cus.PersonId.ToString(); txtCustomerName.Text = cus.ComercialName; } else { txtCustomerId.Text = ""; txtCustomerName.Text = Resources.GeneralResource.CustomerDoesNotExists; } }
protected void Page_Init(object sender, EventArgs e) { ctx = new AriClinicContext("AriClinicContext"); // security control, it must be a user logged if (Session["User"] == null) { Response.Redirect("Default.aspx"); } else { user = CntAriCli.GetUser((Session["User"] as User).UserId, ctx); Process proc = (from p in ctx.Processes where p.Code == "asn" select p).FirstOrDefault <Process>(); per = CntAriCli.GetPermission(user.UserGroup, proc, ctx); } // cheks if is call from another form if (Request.QueryString["Type"] != null) { type = Request.QueryString["Type"]; //cheks if is call from customer form tabs if (type == "InTab") { HtmlControl tt = (HtmlControl)this.FindControl("TitleArea"); tt.Attributes["class"] = "ghost"; // hide patient column RadGrid1.Columns.FindByDataField("Customer.FullName").Visible = false; } } if (Request.QueryString["PatientId"] != null) { patientId = Int32.Parse(Request.QueryString["PatientId"]); pat = CntAriCli.GetPatient(patientId, ctx); cus = pat.Customer; } // read passed customer if any if (Request.QueryString["CustomerId"] != null) { customerId = Int32.Parse(Request.QueryString["CustomerId"]); cus = CntAriCli.GetCustomer(customerId, ctx); } // translate filters CntWeb.TranslateRadGridFilters(RadGrid1); RadGrid1.CurrentPageIndex = RadGrid1.PageCount - 1; }
/// <summary> /// As its name suggest if there isn't an object /// it'll create it. It exists modify it. /// </summary> /// <returns></returns> protected bool CreateChange() { if (!DataOk()) { return(false); } if (customerId == 0) { cus = new Customer(); UnloadData(cus); ctx.Add(cus); } else { cus = CntAriCli.GetCustomer(customerId, ctx); UnloadData(cus); } ctx.SaveChanges(); return(true); }
protected void UnloadData(ServiceNote sn) { sn.ServiceNoteDate = (DateTime)rddpServiceNoteDate.SelectedDate; clinicId = Int32.Parse(rdcbClinic.SelectedValue); sn.Clinic = CntAriCli.GetClinic(clinicId, ctx); sn.User = CntAriCli.GetUser(user.UserId, ctx); // sn.Total = sn.Tickets.Sum(t => t.Amount); sn.Paid = sn.GeneralPayments.Sum(gp => gp.Amount); // customerId = Int32.Parse(rdcComercialName.SelectedValue); sn.Customer = CntAriCli.GetCustomer(customerId, ctx); if (rdcProfessionalName.SelectedValue != "") { professionalId = Int32.Parse(rdcProfessionalName.SelectedValue); sn.Professional = CntAriCli.GetProfessional(professionalId, ctx); } else { sn.Professional = null; } }
protected void Page_Init(object sender, EventArgs e) { ctx = new AriClinicContext("AriClinicContext"); // security control, it must be a user logged if (Session["User"] == null) { Response.Redirect("Default.aspx"); } else { user = CntAriCli.GetUser((Session["User"] as User).UserId, ctx); Process proc = (from p in ctx.Processes where p.Code == "policy" select p).FirstOrDefault <Process>(); per = CntAriCli.GetPermission(user.UserGroup, proc, ctx); } // cheks if is call from another form if (Request.QueryString["Type"] != null) { type = Request.QueryString["Type"]; } // read the realated patient if (Request.QueryString["PatientId"] != null) { patientId = Int32.Parse(Request.QueryString["PatientId"]); pat = CntAriCli.GetPatient(patientId, ctx); cus = pat.Customer; } if (Request.QueryString["CustomerId"] != null) { customerId = Int32.Parse(Request.QueryString["CustomerId"]); cus = CntAriCli.GetCustomer(customerId, ctx); } // translate filters CntWeb.TranslateRadGridFilters(RadGrid1); }
protected void Page_Init(object sender, EventArgs e) { ctx = new AriClinicContext("AriClinicContext"); // security control, it must be a user logged if (Session["User"] == null) { Response.Redirect("Default.aspx"); } else { user = CntAriCli.GetUser((Session["User"] as User).UserId, ctx); Process proc = (from p in ctx.Processes where p.Code == "policy" select p).FirstOrDefault <Process>(); per = CntAriCli.GetPermission(user.UserGroup, proc, ctx); } // cheks if is call from another form if (Request.QueryString["Type"] != null) { type = Request.QueryString["Type"]; } // read the realated patient if (Request.QueryString["PatientId"] != null) { patientId = Int32.Parse(Request.QueryString["PatientId"]); pat = CntAriCli.GetPatient(patientId, ctx); cus = pat.Customer; } // read passed customer if any if (Request.QueryString["CustomerId"] != null) { customerId = Int32.Parse(Request.QueryString["CustomerId"]); cus = CntAriCli.GetCustomer(customerId, ctx); } // if (Request.QueryString["NotPaid"] != null) { notPaid = true; } // if (type == "InTab") { HtmlControl tt = (HtmlControl)this.FindControl("TitleArea"); tt.Attributes["class"] = "ghost"; // hide patient column RadGrid1.Columns.FindByDataField("Policy.Customer.FullName").Visible = false; // RadGrid1.PageSize = 6; } else { } if (Request.QueryString["AnestheticServiceNoteId"] != null) { anestheticServiceNoteId = Int32.Parse(Request.QueryString["AnestheticServiceNoteId"]); asn = CntAriCli.GetAnestheticServiceNote(anestheticServiceNoteId, ctx); HtmlControl tt = (HtmlControl)this.FindControl("TitleArea"); tt.Attributes["class"] = "ghost"; // here the fields that must be hidden RadGrid1.Columns.FindByDataField("TicketDate").Visible = false; RadGrid1.Columns.FindByDataField("Policy.Customer.FullName").Visible = false; RadGrid1.Columns.FindByDataField("Checked").Visible = false; RadGrid1.Columns.FindByDataField("Clinic.Name").Visible = false; } if (Request.QueryString["ServiceNoteId"] != null) { serviceNoteId = int.Parse(Request.QueryString["ServiceNoteId"]); sn = CntAriCli.GetServiceNote(serviceNoteId, ctx); HtmlControl tt = (HtmlControl)this.FindControl("TitleArea"); tt.Attributes["class"] = "ghost"; // here the fields that must be hidden RadGrid1.Columns.FindByDataField("TicketDate").Visible = false; RadGrid1.Columns.FindByDataField("Policy.Customer.FullName").Visible = false; RadGrid1.Columns.FindByDataField("Checked").Visible = false; RadGrid1.Columns.FindByDataField("Clinic.Name").Visible = false; RadGrid1.Columns.FindByDataField("Paid").Visible = false; } // translate filters CntWeb.TranslateRadGridFilters(RadGrid1); // }
protected void Page_Init(object sender, EventArgs e) { ctx = new AriClinicContext("AriClinicContext"); // security control, it must be a user logged // security control, it must be a user logged if (Session["User"] == null) { Response.Redirect("Default.aspx"); } else { user = CntAriCli.GetUser((Session["User"] as User).UserId, ctx); Process proc = (from p in ctx.Processes where p.Code == "usergroup" select p).FirstOrDefault <Process>(); per = CntAriCli.GetPermission(user.UserGroup, proc, ctx); btnAccept.Visible = per.Modify; } // if (Request.QueryString["HcId"] != null) { hcId = Int32.Parse(Request.QueryString["HcId"]); hc = CntAriCli.GetHealthCompany(ctx); txtCaller.Text = hc.Name; } // if (Request.QueryString["ClinicId"] != null) { clinicId = Int32.Parse(Request.QueryString["ClinicId"]); cl = (from c in ctx.Clinics where c.ClinicId == clinicId select c).FirstOrDefault <Clinic>(); txtCaller.Text = cl.Name; } // if (Request.QueryString["PatientId"] != null) { patientId = Int32.Parse(Request.QueryString["PatientId"]); pat = CntAriCli.GetPatient(patientId, ctx); txtCaller.Text = pat.FullName; } // if (Request.QueryString["CustomerId"] != null) { customerId = Int32.Parse(Request.QueryString["CustomerId"]); cus = CntAriCli.GetCustomer(customerId, ctx); txtCaller.Text = cus.FullName; } // if (Request.QueryString["ProfessionalId"] != null) { professionalId = Int32.Parse(Request.QueryString["ProfessionalId"]); prof = CntAriCli.GetProfessional(professionalId, ctx); txtCaller.Text = prof.FullName; } // if (Request.QueryString["AddressId"] != null) { addressId = Int32.Parse(Request.QueryString["AddressId"]); Address adr = (from a in ctx.Addresses where a.AddressId == addressId select a).FirstOrDefault <Address>(); LoadData(adr); } else { LoadTypeCombo(null); } }
protected void Page_Init(object sender, EventArgs e) { ctx = new AriClinicContext("AriClinicContext"); // security control, it must be a user logged if (Session["User"] == null) { Response.Redirect("Default.aspx"); } else { user = CntAriCli.GetUser((Session["User"] as User).UserId, ctx); Process proc = (from p in ctx.Processes where p.Code == "ticket" select p).FirstOrDefault <Process>(); per = CntAriCli.GetPermission(user.UserGroup, proc, ctx); btnAccept.Visible = per.Modify; } if (Request.QueryString["CustomerId"] != null) { customerId = Int32.Parse(Request.QueryString["CustomerId"]); cus = CntAriCli.GetCustomer(customerId, ctx); //txtCustomerId.Text = cus.PersonId.ToString(); rdcComercialName.Items.Clear(); rdcComercialName.Items.Add(new RadComboBoxItem(cus.FullName, cus.PersonId.ToString())); rdcComercialName.SelectedValue = cus.PersonId.ToString(); rdcComercialName.Enabled = false; btnCustomerId.Visible = false; } else { LoadClinicCombo(null); } if (Session["Clinic"] != null) { cl = (Clinic)Session["Clinic"]; } // if (Request.QueryString["AnestheticServiceNoteId"] != null) { anestheticServiceNoteId = Int32.Parse(Request.QueryString["AnestheticServiceNoteId"]); asn = CntAriCli.GetAnestheticServiceNote(anestheticServiceNoteId, ctx); cus = asn.Customer; customerId = cus.PersonId; if (!IsPostBack) { LoadData(asn); } // Load internal frame HtmlControl frm = (HtmlControl)this.FindControl("ifTickets"); frm.Attributes["src"] = String.Format("TicketGrid.aspx?AnestheticServiceNoteId={0}", anestheticServiceNoteId); } else { // If there isn't a ticket the default date must be today rddpServiceNoteDate.SelectedDate = DateTime.Now; LoadClinicCombo(null); } }
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e) { customerId = Int32.Parse(e.Argument); cus = CntAriCli.GetCustomer(customerId, ctx); LoadPolicyCombo(null); }
protected void Page_Init(object sender, EventArgs e) { ctx = new AriClinicContext("AriClinicContext"); // security control, it must be a user logged if (Session["User"] == null) { Response.Redirect("Default.aspx"); } else { user = CntAriCli.GetUser((Session["User"] as User).UserId, ctx); Process proc = (from p in ctx.Processes where p.Code == "ticket" select p).FirstOrDefault <Process>(); per = CntAriCli.GetPermission(user.UserGroup, proc, ctx); btnAccept.Visible = per.Modify; if (user.Professionals.Count > 0) { prof = user.Professionals[0]; txtProfessionalId.Text = prof.PersonId.ToString(); txtProfessionalName.Text = prof.FullName; } } // if (Request.QueryString["CustomerId"] != null) { customerId = Int32.Parse(Request.QueryString["CustomerId"]); cus = CntAriCli.GetCustomer(customerId, ctx); txtCustomerId.Text = cus.PersonId.ToString(); txtComercialName.Text = cus.FullName; // if a patient has been passed we can not touch it txtCustomerId.Enabled = false; txtComercialName.Enabled = false; btnCustomerId.Visible = false; LoadPolicyCombo(null); } else { LoadPolicyCombo(null); LoadClinicCombo(null); } if (Session["Clinic"] != null) { cl = (Clinic)Session["Clinic"]; } // if (Request.QueryString["ServiceNoteId"] != null) { serviceNoteId = int.Parse(Request.QueryString["ServiceNoteId"]); sn = CntAriCli.GetServiceNote(serviceNoteId, ctx); // disable select fields cus = sn.Customer; txtCustomerId.Text = cus.PersonId.ToString(); txtCustomerId.Enabled = false; txtComercialName.Text = cus.FullName; txtComercialName.Enabled = false; cl = sn.Clinic; prof = sn.Professional; if (prof != null) { txtProfessionalId.Text = prof.PersonId.ToString(); txtProfessionalId.Enabled = false; txtProfessionalName.Text = prof.FullName; txtProfessionalName.Enabled = false; } rddpTicketDate.SelectedDate = sn.ServiceNoteDate; } // if (Request.QueryString["TicketId"] != null) { ticketId = Int32.Parse(Request.QueryString["TicketId"]); tck = CntAriCli.GetTicket(ticketId, ctx); cus = tck.Policy.Customer; customerId = cus.PersonId; if (tck.ServiceNote != null) { sn = tck.ServiceNote; serviceNoteId = sn.ServiceNoteId; } LoadData(tck); } else { // If there isn't a ticket the default date must be today rddpTicketDate.SelectedDate = DateTime.Now; if (sn != null) { rddpTicketDate.SelectedDate = sn.ServiceNoteDate; } LoadPolicyCombo(null); LoadClinicCombo(null); } }
protected void Page_Init(object sender, EventArgs e) { ctx = new AriClinicContext("AriClinicContext"); // security control, it must be a user logged if (Session["User"] == null) { Response.Redirect("Default.aspx"); } else { user = CntAriCli.GetUser((Session["User"] as User).UserId, ctx); Process proc = (from p in ctx.Processes where p.Code == "ticket" select p).FirstOrDefault <Process>(); per = CntAriCli.GetPermission(user.UserGroup, proc, ctx); btnAccept.Visible = per.Modify; } // if (Request.QueryString["CustomerId"] != null) { customerId = Int32.Parse(Request.QueryString["CustomerId"]); cus = CntAriCli.GetCustomer(customerId, ctx); txtCustomerId.Text = cus.PersonId.ToString(); txtComercialName.Text = cus.FullName; // if a patient has been passed we can not touch it txtCustomerId.Enabled = false; txtComercialName.Enabled = false; btnCustomerId.Visible = false; LoadPolicyCombo(null); } else { LoadPolicyCombo(null); LoadClinicCombo(null); } if (Session["Clinic"] != null) { cl = (Clinic)Session["Clinic"]; } // if (Request.QueryString["TicketId"] != null) { ticketId = Int32.Parse(Request.QueryString["TicketId"]); tck = (AnestheticTicket)CntAriCli.GetTicket(ticketId, ctx); cus = tck.Policy.Customer; customerId = cus.PersonId; LoadData(tck); } else { // If there isn't a ticket the default date must be today rddpTicketDate.SelectedDate = DateTime.Now; LoadPolicyCombo(null); LoadClinicCombo(null); } // if (Request.QueryString["AnestheticTicketId"] != null) { anestheticTicketId = int.Parse(Request.QueryString["AnestheticTicketId"]); ticketId = anestheticTicketId; tck = (AnestheticTicket)CntAriCli.GetTicket(anestheticTicketId, ctx); LoadData(tck); //rddpTicketDate.SelectedDate = tck.TicketDate; //txtCustomerId.Text = tck.Policy.Customer.PersonId.ToString(); //cus = CntAriCli.GetCustomer(tck.Policy.Customer.PersonId, ctx); //LoadPolicyCombo(tck); //txtComercialName.Text = cus.ComercialName; //chkChecked.Checked = tck.Checked; //if (tck.Professional != null) //{ // txtProfessionalId.Text = tck.Professional.PersonId.ToString(); // txtProfessionalName.Text = tck.Professional.FullName; //} //if (tck.Procedure != null) //{ // txtProcedureId.Text = tck.Procedure.ProcedureId.ToString(); // txtProcedureName.Text = tck.Procedure.Name; //} //if (tck.Surgeon != null) //{ // txtSurgeonId.Text = tck.Surgeon.PersonId.ToString(); // txtSurgeonName.Text = tck.Surgeon.FullName; //} //// //LoadClinicCombo(tck); //txtInsuranceServiceId.Text = tck.InsuranceService.InsuranceServiceId.ToString(); //txtInsuranceServiceName.Text = tck.InsuranceService.Service.Name; //txtDescription.Text = tck.Description; //txtAmount.Text = tck.Amount.ToString(); //txtComments.Text = tck.Comments; } // //if (Request.QueryString["AnestheticServiceNoteId"] != null) //{ // anestheticServiceNoteId = int.Parse(Request.QueryString["AnestheticServiceNoteid"]); // asn = CntAriCli.GetAnestheticServiceNote(anestheticServiceNoteId, ctx); // rddpTicketDate.SelectedDate = asn.ServiceNoteDate; rddpTicketDate.Enabled = false; // txtCustomerId.Text = asn.Customer.PersonId.ToString(); txtCustomerId.Enabled = false; // cus = asn.Customer; LoadPolicyCombo(null); // txtComercialName.Text = asn.Customer.ComercialName; txtComercialName.Enabled = false; // txtProfessionalId.Text = asn.Professional.PersonId.ToString(); txtProfessionalId.Enabled = false; // txtProfessionalName.Text = asn.Professional.FullName; txtProfessionalName.Enabled = false; // txtProcedureId.Text = asn.Procedures[0].ProcedureId.ToString(); txtProcedureId.Enabled = false; // txtProcedureName.Text = asn.Procedures[0].Name; txtProcedureName.Enabled = false; // if (asn.Surgeon != null) // { // txtSurgeonId.Text = asn.Surgeon.PersonId.ToString(); txtSurgeonId.Enabled = false; // txtSurgeonName.Text = asn.Surgeon.FullName; txtSurgeonName.Enabled = false; // } // SetFocus(FindControl("txtInsuranceServiceId")); //} }
protected void Page_Init(object sender, EventArgs e) { ctx = new AriClinicContext("AriClinicContext"); // security control, it must be a user logged if (Session["User"] == null) { Response.Redirect("Default.aspx"); } else { user = CntAriCli.GetUser((Session["User"] as User).UserId, ctx); Process proc = (from p in ctx.Processes where p.Code == "policy" select p).FirstOrDefault <Process>(); per = CntAriCli.GetPermission(user.UserGroup, proc, ctx); } if (Session["Clinic"] != null) { cl = (Clinic)Session["Clinic"]; } // cheks if is call from another form if (Request.QueryString["Type"] != null) { type = Request.QueryString["Type"]; } // read the realated patient if (Request.QueryString["PatientId"] != null) { patientId = Int32.Parse(Request.QueryString["PatientId"]); pat = CntAriCli.GetPatient(patientId, ctx); cus = pat.Customer; } // read passed customer if any if (Request.QueryString["CustomerId"] != null) { customerId = Int32.Parse(Request.QueryString["CustomerId"]); cus = CntAriCli.GetCustomer(customerId, ctx); } // if (Request.QueryString["NotPaid"] != null) { notPaid = true; } // if (type == "InTab") { HtmlControl tt = (HtmlControl)this.FindControl("TitleArea"); tt.Attributes["class"] = "ghost"; // hide patient column RadGrid1.Columns.FindByDataField("Policy.Customer.FullName").Visible = false; } else if (type == "comprobante") { HtmlControl tt = (HtmlControl)this.FindControl("Actions"); tt.Attributes["class"] = "ghost"; // hide patient column //RadGrid1.Columns.FindByDataField("Policy.Customer.FullName").Visible = false; btnComp.Visible = true; lblTitle.Text = "Comprobantes"; rdcbType.AutoPostBack = true; rdcbType.Items.Clear(); rdcbType.Items.Add(new RadComboBoxItem("Con comprobante", "C")); rdcbType.Items.Add(new RadComboBoxItem("Sin comprobante", "SC")); RadGrid1.PageSize = 6; } else { // RadGrid1.PageSize = 6; } // translate filters CntWeb.TranslateRadGridFilters(RadGrid1); // LoadInsuranceCombo(); LoadPayementFormCombo(); LoadClinicCombo(); }
protected void Page_Init(object sender, EventArgs e) { ctx = new AriClinicContext("AriClinicContext"); // security control, it must be a user logged if (Session["User"] == null) { Response.Redirect("Default.aspx"); } else { user = CntAriCli.GetUser((Session["User"] as User).UserId, ctx); } // if (Request.QueryString["HcId"] != null) { hcId = Int32.Parse(Request.QueryString["HcId"]); hc = CntAriCli.GetHealthCompany(ctx); txtCaller.Text = hc.Name; } // if (Request.QueryString["ClinicId"] != null) { clinicId = Int32.Parse(Request.QueryString["ClinicId"]); cl = (from c in ctx.Clinics where c.ClinicId == clinicId select c).FirstOrDefault <Clinic>(); txtCaller.Text = cl.Name; } // if (Request.QueryString["PatientId"] != null) { patientId = Int32.Parse(Request.QueryString["PatientId"]); pat = CntAriCli.GetPatient(patientId, ctx); txtCaller.Text = pat.FullName; } // if (Request.QueryString["CustomerId"] != null) { customerId = Int32.Parse(Request.QueryString["CustomerId"]); cus = CntAriCli.GetCustomer(customerId, ctx); txtCaller.Text = cus.FullName; } // if (Request.QueryString["ProfessionalId"] != null) { professionalId = Int32.Parse(Request.QueryString["ProfessionalId"]); prof = CntAriCli.GetProfessional(professionalId, ctx); txtCaller.Text = prof.FullName; } // if (Request.QueryString["EmailId"] != null) { emailId = Int32.Parse(Request.QueryString["EmailId"]); Email eml = (from t in ctx.Emails where t.EmailId == emailId select t).FirstOrDefault <Email>(); LoadData(eml); } else { LoadTypeCombo(null); } }