protected void btnsave_Click(object sender, EventArgs e)
    {
        SearchDrugClassFirst();
        if (drclass == 0)
        {

        }
        if (drclass == 1)
        {

            try
            {

                TextBox txtdrugclass = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("txtdrugclass") as TextBox;
                    ClassDataManager v = new ClassDataManager();
                    v.AddDRUG_CLASSNOW(txtdrugclass.Text, 1);
                    Jkl();
                    Label lblAdminID = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("lblAdminID") as Label;
                    v.AdddrugsCLASSES_Transactions(double.Parse(Label3.Text), double.Parse(Label4.Text), double.Parse(lblAdminID.Text));//1 is the admin
                    Response.Redirect("AddDrugsSpecifications.aspx?DrugCode=" + double.Parse(Label4.Text));
            }
            catch (Exception)
            {
                Response.Redirect("AddDrugsSpecifications.aspx?DrugCode=" + double.Parse(Label4.Text));
            }
        }
    }
예제 #2
0
 protected void Button4_Click(object sender, EventArgs e)
 {
     SearchDrugClassFirst();
     if (drclass == 0)
     {
     }
     if (drclass == 1)
     {
         try
         {
             double x = double.Parse(TextBox4.Text.Length.ToString());
             if (x > 0)
             {
                 ClassDataManager v = new ClassDataManager();
                 v.AddDRUG_CLASSNOW(TextBox4.Text, double.Parse(Label11.Text));
                 Jkl();
                 v.AdddrugsCLASSES_Transactions(double.Parse(Label19.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));
         }
     }
 }
예제 #3
0
 protected void btnsave_Click(object sender, EventArgs e)
 {
     SearchDrugClassFirst();
     if (drclass == 0)
     {
     }
     if (drclass == 1)
     {
         try
         {
             TextBox          txtdrugclass = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("txtdrugclass") as TextBox;
             ClassDataManager v            = new ClassDataManager();
             v.AddDRUG_CLASSNOW(txtdrugclass.Text, 1);
             Jkl();
             Label lblAdminID = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("lblAdminID") as Label;
             v.AdddrugsCLASSES_Transactions(double.Parse(Label3.Text), double.Parse(Label4.Text), double.Parse(lblAdminID.Text));    //1 is the admin
             Response.Redirect("AddDrugsSpecifications.aspx?DrugCode=" + double.Parse(Label4.Text));
         }
         catch (Exception)
         {
             Response.Redirect("AddDrugsSpecifications.aspx?DrugCode=" + double.Parse(Label4.Text));
         }
     }
 }