protected void Page_Load(object sender, EventArgs e) { ClassPrescription loadData = new ClassPrescription(); loadData.LoadPrescriptionData(GridViewPrescriptions); btnUpdate.CssClass = "btn btn-warning disabled"; btnView.CssClass = "btn btn-primary disabled"; }
protected void GridViewPrescriptions_SelectedIndexChanged(object sender, EventArgs e) { string vPresId = GridViewPrescriptions.SelectedRow.Cells[1].Text; ClassPrescription loadPriscription = new ClassPrescription(); loadPriscription.ViewPrescription(vPresId, panelDataView); btnUpdate.CssClass = "btn btn-warning enabled"; btnView.CssClass = "btn btn-primary enabled"; }
protected void Page_Load(object sender, EventArgs e) { btnAdd.CssClass = "btn btn-success disabled"; btnDelete.CssClass = "btn btn-danger disabled"; GridViewDrugItems.EmptyDataText = "Empty"; GridViewDrugItems.ShowHeaderWhenEmpty = true; ClassPrescription generateId = new ClassPrescription(); txPrescriptionId.Text = generateId.GeneratePriscriptionId(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { txPrescriptionId.Text = Request.QueryString["vPresId"]; btnAdd.CssClass = "btn btn-success disabled"; btnDelete.CssClass = "btn btn-danger disabled"; ClassPrescription loadData = new ClassPrescription(); loadData.LoadDataToUpdate(this); } }
protected void btnConfirmComplete_Click(object sender, EventArgs e) { if (GridViewDrugItems.Rows.Count == 0) { this.ClientScript.RegisterStartupScript(this.GetType(), "SweetAlert", "swal('Error!', 'No drugs added', 'error');", true); } else if (ddCustomer.SelectedIndex == 0 || ddPhysician.SelectedIndex == 0 || ddPaymentMethod.SelectedIndex == 0 || ddPrescriptionStatus.SelectedIndex == 0 || txPrescriptionDate.Text.Length == 0) { this.ClientScript.RegisterStartupScript(this.GetType(), "SweetAlert", "swal('Error!', 'One or more fields are not filled', 'error');", true); } else { ClassPrescription addPrescription = new ClassPrescription(); addPrescription.AddNewPrescription(this); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ClassPrescription loadData = new ClassPrescription(); loadData.LoadPrescriptionData(GridViewPrescriptions); } System.Web.UI.HtmlControls.HtmlGenericControl li = (System.Web.UI.HtmlControls.HtmlGenericControl) this.Page.Master.FindControl("liPrescription"); System.Web.UI.HtmlControls.HtmlGenericControl span1 = (System.Web.UI.HtmlControls.HtmlGenericControl) this.Page.Master.FindControl("spanPrescription1"); System.Web.UI.HtmlControls.HtmlGenericControl span2 = (System.Web.UI.HtmlControls.HtmlGenericControl) this.Page.Master.FindControl("spanPrescription2"); li.Attributes.Add("class", "item-menu active-menu"); span1.Attributes.Add("class", "fa fa-sticky-note fa-2x active-span"); span2.Attributes.Add("class", "menu active-span"); btnUpdate.CssClass = "btn btn-warning disabled"; btnView.CssClass = "btn btn-primary disabled"; btnDelete.CssClass = "btn btn-danger disabled"; }
protected void btnDeletePrescriptionSubmit_Click(object sender, EventArgs e) { ClassPrescription deletePrescription = new ClassPrescription(); deletePrescription.DeletePrescription(this); }
protected void btnSearch_Click(object sender, EventArgs e) { ClassPrescription searchPrescription = new ClassPrescription(); searchPrescription.SearchPrescription(txSearch, ddSearch, GridViewPrescriptions); }