protected void Button1_Click(object sender, EventArgs e)
    {
        H();
        SearchformsFirst();
        if (forn == 0)
        {
            LinkButton LinkButton4 = ArticleAvailableForms.ContentPlaceholder.Controls[0].FindControl("LinkButton7") as LinkButton;
            LinkButton4.Visible = true;
        }

        if (forn == 1)
        {
            try
            {
                Label lblAdminID = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("lblAdminID") as Label;
                TextBox txtforms = ArticleAvailableForms.ContentPlaceholder.Controls[0].FindControl("txtforms") as TextBox;
                ClassDataManager v = new ClassDataManager();
                v.AddForms(txtforms.Text, double.Parse(lblAdminID.Text));
                H();
                Label Label13x = ArticleAvailableForms.ContentPlaceholder.Controls[0].FindControl("Label13x") as Label;
                v.AddFormsdrugs(double.Parse(Label13x.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));
            }
        }
    }
Exemplo n.º 2
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        H();
        SearchformsFirst();
        if (forn == 0)
        {
            LinkButton LinkButton4 = ArticleAvailableForms.ContentPlaceholder.Controls[0].FindControl("LinkButton7") as LinkButton;
            LinkButton4.Visible = true;
        }

        if (forn == 1)
        {
            try
            {
                Label            lblAdminID = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("lblAdminID") as Label;
                TextBox          txtforms   = ArticleAvailableForms.ContentPlaceholder.Controls[0].FindControl("txtforms") as TextBox;
                ClassDataManager v          = new ClassDataManager();
                v.AddForms(txtforms.Text, double.Parse(lblAdminID.Text));
                H();
                Label Label13x = ArticleAvailableForms.ContentPlaceholder.Controls[0].FindControl("Label13x") as Label;
                v.AddFormsdrugs(double.Parse(Label13x.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));
            }
        }
    }
Exemplo n.º 3
0
 protected void Button3_Click(object sender, EventArgs e)
 {
     SearchformsFirst();
     if (forn == 0)
     {
         LinkButton4.Visible = true;
     }
     if (forn == 1)
     {
         try
         {
             double x = double.Parse(TextBox3.Text.Length.ToString());
             if (x > 0)
             {
                 ClassDataManager v = new ClassDataManager();
                 v.AddForms(TextBox3.Text, double.Parse(Label11.Text));
                 H();
                 v.AddFormsdrugs(double.Parse(Label13.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));
         }
     }
 }