protected void ButtonSave_Click(object sender, EventArgs e) { try { Label lblAdminID = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("lblAdminID") as Label; ClassDataManager v = new ClassDataManager(); v.AddDrugDosage("•" + TextBox1.Text, double.Parse(lblAdminID.Text)); J(); v.AdddrugsDosage_Transactions(double.Parse(Label12.Text), double.Parse(Label4.Text), double.Parse(lblAdminID.Text)); Response.Redirect("AddDrugsSpecifications.aspx?&DrugCode=" + double.Parse(Label4.Text)); } catch (Exception) { Response.Redirect("AddDrugsSpecifications.aspx?DrugCode=" + double.Parse(Label4.Text)); } }
protected void Button1_Click(object sender, EventArgs e) { try { double x = double.Parse(TextBox1.Text.Length.ToString()); if (x > 0) { ClassDataManager v = new ClassDataManager(); v.AddDrugDosage("•" + TextBox1.Text, double.Parse(Label11.Text)); J(); v.AdddrugsDosage_Transactions(double.Parse(Label15.Text), double.Parse(Label12.Text), double.Parse(Label11.Text)); Response.Redirect("AddDrugSpecifications.aspx?AdminID=" + double.Parse(Label11.Text) + "&DrugCode=" + double.Parse(Label12.Text)); } } catch (Exception) { Response.Redirect("AddDrugSpecifications.aspx?AdminID=" + double.Parse(Label11.Text) + "&DrugCode=" + double.Parse(Label12.Text)); } }