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));
            }
        }
    }
示例#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));
            }
        }
    }
    void PostDrugClass()
    {
        GridView GridViewCustomers = Article2.ContentPlaceholder.Controls[0].FindControl("GridViewCustomers") as GridView;

        GridViewCustomers.DataSource = ClassDataManager.Customer_Load();
        GridViewCustomers.DataBind();
    }
示例#4
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        SqlConnection conn = new System.Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings["dbaseconnection"].ConnectionString);

        try
        {
            SqlCommand command = new SqlCommand("SELECT * FROM tbl_Administrator WHERE Adminuser ='******' AND AdminPassword ='******'", conn);
            conn.Open();
            SqlDataReader dr = command.ExecuteReader();
            if (dr.HasRows)
            {
                while (dr.Read())
                {
                    Label6.Text = dr[1].ToString() + ", " + dr[2].ToString() + " " + dr[3].ToString() + "(Administrator)";
                    ClassDataManager c = new ClassDataManager();
                    Label5.Text               = dr[0].ToString();
                    Session["USERS"]          = Label6.Text;
                    Session["Administration"] = Label5.Text;
                    Response.Redirect("Administrator.aspx?AdminID=" + double.Parse(Label5.Text));
                }
            }
            else
            {
                //Label5.Text.Text = "Check your Username/Password";
            }
        }
        catch (Exception)
        {
            //AdminStatus.Text = "failed to login";
        }
        finally
        {
            conn.Close();
        }
    }
示例#5
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     SearchSideEffectsfirst();
     if (sidem == 0)
     {
     }
     if (sidem == 1)
     {
         try
         {
             double x = double.Parse(TextBox2.Text.Length.ToString());
             if (x > 0)
             {
                 ClassDataManager v = new ClassDataManager();
                 v.AddDrugsideEFFECTS("•" + TextBox2.Text, double.Parse(Label11.Text));
                 I();
                 v.AdddrugsEffects_Transactions(double.Parse(Label14.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));
         }
     }
 }
示例#6
0
    void Detect_ExpensesDescription_conflict_expenses()
    {
        SqlConnection conn = new System.Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings["dbaseconnection"].ConnectionString);

        try
        {
            SqlCommand commandz = new SqlCommand("SELECT        RegisteredUsers.registereduserID, tbl_expensesDesc.expensesdescription   FROM            RegisteredUsers INNER JOIN  tbl_expenses_users ON RegisteredUsers.registereduserID = tbl_expenses_users.registereduserID INNER JOIN    tbl_expensesDesc ON tbl_expenses_users.expensesID = tbl_expensesDesc.expensesID  WHERE RegisteredUsers.registereduserID ='" + double.Parse(lbluserID_hiden.Text) + "' AND tbl_expensesDesc.expensesdescription = '" + txtExpensesDescription.Text + "'", conn);
            conn.Open();
            SqlDataReader drz = commandz.ExecuteReader();
            if (drz.HasRows)
            {
                while (drz.Read())
                {
                    Label1.Visible   = true;
                    Linksave.Visible = false;
                }
            }
            else
            {
                Label1.Visible = false;
                ClassDataManager data = new ClassDataManager();
                data.AddExpensesDescriptions(txtExpensesDescription.Text);
                LoadLatestExpenseInput();
                Linksave.Visible = true;
            }
        }
        catch (Exception)
        {
        }
        finally
        {
            conn.Close();
        }
    }
示例#7
0
    void LoadLatestExpenseInput()
    {
        SqlConnection conn = new System.Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings["dbaseconnection"].ConnectionString);

        try
        {
            SqlCommand command = new SqlCommand("SELECT  TOP (1) expensesID FROM tbl_expensesDesc ORDER BY expensesID DESC", conn);
            conn.Open();
            SqlDataReader dr = command.ExecuteReader();
            if (dr.HasRows)
            {
                while (dr.Read())
                {
                    Label1.Visible = false;
                    lbllatestExpenseId_Hiden.Text = dr[0].ToString();
                    ClassDataManager inssertData = new ClassDataManager();
                    inssertData.AddExpensesDescriptions_Users(double.Parse(lbluserID_hiden.Text), double.Parse(lbllatestExpenseId_Hiden.Text));
                }
            }
        }
        catch (Exception)
        {
        }
        finally
        {
            conn.Close();
        }
    }
示例#8
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));
         }
     }
 }
    void DetectUserName()
    {
        SqlConnection conn = new System.Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings["dbaseconnection"].ConnectionString);

        try
        {
            SqlCommand commandz = new SqlCommand("SELECT  * FROM RegisteredUsers WHERE username = '******'", conn);
            conn.Open();
            SqlDataReader drz = commandz.ExecuteReader();
            if (drz.HasRows)
            {
                while (drz.Read())
                {
                    //lnktagcategory.Text = drz[0].ToString();
                    lbldetectusername.Visible = true;
                }
            }
            else
            {
                lbldetectusername.Visible = false;
                ClassDataManager addusers = new ClassDataManager();
                addusers.Addusers(txtlastname.Text, txtfirstname.Text, txtmiddlename.Text, txtemailaddress.Text, txtuser.Text, txtpassword.Text);
                lnkLoginPage.Visible = true;
            }
        }
        catch (Exception)
        {
        }
        finally
        {
            conn.Close();
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        SearchSymptomps();

        if (Proceed == 0)
        {

        }
        if (Proceed == 1)
        {
            try
            {
                ClassDataManager v = new ClassDataManager();
                v.Addsymptoms_NOW(TextBox1.Text, double.Parse(lblAdminID.Text));
                J();
                addproceed2();
                Response.Redirect("AddTreatMent.aspx?IllnessCode=" + int.Parse(Label6z.Text));
            }
            catch (Exception)
            {
                throw;
                //Response.Redirect("Default.aspx?");
            }
        }
    }
    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));
            }
        }
    }
示例#12
0
        public DataManager()
        {
            ConnectionString  = "Data Source=";
            ConnectionString += Directory.GetCurrentDirectory();
            ConnectionString += "\\data.sqlite;Version=3;Read Only=True;";

            TemplatePath = Directory.GetCurrentDirectory() + "\\template.html";

            random = new Random();

            UsedBooks = new List <string>();
            UsedBooks.Add("Player's Handbook");

            RaceData                = new RaceDataManager(ConnectionString, UsedBooks);
            AppearanceData          = new AppearanceDataManager(ConnectionString, UsedBooks);
            ClassData               = new ClassDataManager(ConnectionString, UsedBooks);
            BackgroundData          = new BackgroundDataManager(ConnectionString, UsedBooks);
            AbilityData             = new AbilityDataManager(ConnectionString, UsedBooks);
            LanguageData            = new LanguageDataManager(ConnectionString, UsedBooks);
            SkillData               = new SkillDataManager(ConnectionString, UsedBooks);
            EquipmentData           = new EquipmentDataManager(ConnectionString, UsedBooks);
            SpellData               = new SpellDataManager(ConnectionString, UsedBooks);
            ExtraRaceChoiceData     = new ExtraRaceChoiceDataManager(ConnectionString, UsedBooks);
            ExtraClassChoiceData    = new ExtraClassChoiceDataManager(ConnectionString, UsedBooks);
            ExtraSubclassChoiceData = new ExtraSubclassChoiceDataManager(ConnectionString, UsedBooks);
            NameData                = new NameDataManager(ConnectionString, UsedBooks);
            StoryData               = new StoryDataManager(ConnectionString, UsedBooks);
            ExportData              = new ExportDataManager(ConnectionString, TemplatePath, UsedBooks);
        }
示例#13
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));
         }
     }
 }
示例#14
0
        public void Delete(string value)
        {
            var dataDelete = new ClassDataModel();

            dataDelete.ClassId = int.Parse(value);
            ClassDataManager.Delete(dataDelete, SessionVariables.RequestProfile);
        }
示例#15
0
        public void Update([FromBody] dynamic data)
        {
            var jsonString = JsonConvert.SerializeObject(data);
            var dataUpdate = JsonConvert.DeserializeObject <ClassDataModel>(jsonString);

            ClassDataManager.Update(dataUpdate, SessionVariables.RequestProfile);
        }
示例#16
0
        public void Create([FromBody] dynamic data)
        {
            var jsonString = JsonConvert.SerializeObject(data);
            var dataCreate = JsonConvert.DeserializeObject <ClassDataModel>(jsonString);

            dataCreate.ApplicationId = SessionVariables.RequestProfile.ApplicationId;

            ClassDataManager.Create(dataCreate, SessionVariables.RequestProfile);
        }
示例#17
0
        public ClassDataModel GetById(string value)
        {
            var dataQuery = new ClassDataModel();

            dataQuery.ClassId = int.Parse(value);

            var result = ClassDataManager.GetEntityDetails(dataQuery, SessionVariables.RequestProfile, 1);

            return(result[0]);
        }
 void home()
 {
     try
     {
         ClassDataManager v = new ClassDataManager();
         v.AddHomeRemedies(TextBox2.Text, double.Parse(Label6.Text), double.Parse(Label7.Text));
     }
     catch (Exception)
     {
         Response.Redirect("AddTreatMent.aspx?AdminID=" + double.Parse(Label7.Text) + "&IllnessCode=" + int.Parse(Label6.Text));
     }
 }
 void addproceed2()
 {
     try
     {
         ClassDataManager v = new ClassDataManager();
         v.Addsymptoms_Proceed2(double.Parse(Label6.Text), double.Parse(Label11.Text), double.Parse(Label7.Text));
         LinkButton4.Visible = false;
     }
     catch (Exception)
     {
         throw;
     }
 }
示例#20
0
 void PostExpenses()
 {
     try
     {
         GridView1.DataSource = ClassDataManager.AllExpenses(iid);
         GridView1.DataBind();
     }
     catch (Exception)
     {
         throw;
         // Response.Redirect("Login.aspx");
     }
 }
示例#21
0
 void PostViewReports_spent()
 {
     try
     {
         GridView1.DataSource = ClassDataManager.view_User_Expenses_Reports(iid);
         GridView1.DataBind();
     }
     catch (Exception)
     {
         throw;
         // Response.Redirect("Login.aspx");
     }
 }
 void PostExpenses_byDate()
 {
     try
     {
         GridView1.DataSource = ClassDataManager.view_Expenses_Categorized(expenseIDEN);
         GridView1.DataBind();
     }
     catch (Exception)
     {
         //throw;
         Response.Redirect("Login.aspx");
     }
 }
示例#23
0
 void PostExpenses_byDate()
 {
     try
     {
         GridView1.DataSource = ClassDataManager.view_Expenses(double.Parse(expense_user.ToString()));
         GridView1.DataBind();
     }
     catch (Exception)
     {
         throw;
         // Response.Redirect("Login.aspx");
     }
 }
 protected void Button1_Click1(object sender, EventArgs e)
 {
     try
     {
         ClassDataManager v = new ClassDataManager();
         v.AddMedicine(TextBox1.Text, TextBox2.Text, TextBox3.Text, double.Parse(Label6.Text));
         Response.Redirect("AddMedicine.aspx?AdminID=" + double.Parse(Label6.Text));
         //Response.Redirect("AddMedicine.aspx?AdminID=" + double.Parse(Label6.Text));
     }
     catch (Exception)
     {
         Response.Redirect("AddMedicine.aspx?AdminID=" + double.Parse(Label6.Text));
     }
 }
示例#25
0
 void ko()
 {
     try
     {
         ClassDataManager v          = new ClassDataManager();
         Label            lblAdminID = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("lblAdminID") as Label;
         v.AdddrugsEffects_Transactions(double.Parse(Label10.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));
     }
 }
示例#26
0
 void classx()
 {
     try
     {
         TextBox          txtdrugclass = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("txtdrugclass") as TextBox;
         ClassDataManager v            = new ClassDataManager();
         Label            lblAdminID   = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("lblAdminID") as Label;
         v.AdddrugsCLASSES_Transactions(double.Parse(Label2.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));
     }
 }
 void PostExpenses_byDate_Categorized()
 {
     try
     {
         string start = txtstartdate.Text + " 12:00:01 AM";
         string end   = txtenddate.Text + " 11:59:00 PM";
         GridView1.DataSource = ClassDataManager.view_Expenses_Categorized_bydate(double.Parse(lblRecordsID.Text), start, end);
         GridView1.DataBind();
     }
     catch (Exception)
     {
         //throw;
         Response.Redirect("Login.aspx");
     }
 }
示例#28
0
 protected void LinkButton7_Click(object sender, EventArgs e)
 {
     try
     {
         ClassDataManager v          = new ClassDataManager();
         Label            lblAdminID = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("lblAdminID") as Label;
         Label            Label16z   = ArticleAvailableForms.ContentPlaceholder.Controls[0].FindControl("Label16z") as Label;
         v.AddFormsdrugs(double.Parse(Label16z.Text), double.Parse(Label4.Text), double.Parse(lblAdminID.Text));
         Response.Redirect("AddDrugSpecifications.aspx?DrugCode=" + double.Parse(Label4.Text));
     }
     catch (Exception)
     {
         Response.Redirect("AddDrugsSpecifications.aspx?DrugCode=" + double.Parse(Label4.Text));
     }
 }
示例#29
0
 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));
     }
 }
示例#30
0
 protected void LinkButton4_Click(object sender, EventArgs e)
 {
     try
     {
         double x = double.Parse(TextBox3.Text.Length.ToString());
         if (x > 0)
         {
             ClassDataManager v = new ClassDataManager();
             v.AddFormsdrugs(double.Parse(Label16.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));
     }
 }
示例#31
0
 void classx()
 {
     try
     {
         double x = double.Parse(TextBox4.Text.Length.ToString());
         if (x > 0)
         {
             ClassDataManager v = new ClassDataManager();
             v.AdddrugsCLASSES_Transactions(double.Parse(Label18.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));
     }
 }
示例#32
0
    void Detect_ExpensesDescription()
    {
        SqlConnection conn = new System.Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings["dbaseconnection"].ConnectionString);

        try
        {
            SqlCommand command = new SqlCommand("SELECT * FROM tbl_expensesDesc WHERE expensesDescription = '" + txtExpensesDescription.Text + "'", conn);
            conn.Open();
            SqlDataReader dr = command.ExecuteReader();
            if (dr.HasRows)
            {
                while (dr.Read())
                {
                    lbllatestExpenseId_Hiden.Text = dr[0].ToString();
                    Detect_ExpensesDescription_conflict(double.Parse(lbluserID_hiden.Text), double.Parse(lbllatestExpenseId_Hiden.Text));

                    if (lblconnect.Text != "Detected")
                    {
                        Label1.Visible = false;
                        ClassDataManager inssertData = new ClassDataManager();
                        inssertData.AddExpensesDescriptions_Users(double.Parse(lbluserID_hiden.Text), double.Parse(lbllatestExpenseId_Hiden.Text));
                    }
                    else
                    {
                        Label1.Visible = true;
                    }
                }
            }
            else
            {
                ClassDataManager data = new ClassDataManager();
                data.AddExpensesDescriptions(txtExpensesDescription.Text);
                LoadLatestExpenseInput();
            }
        }
        catch (Exception)
        {
        }
        finally
        {
            conn.Close();
        }
    }
示例#33
0
 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));
     }
 }
示例#34
0
    protected void Button1_Click1(object sender, EventArgs e)
    {
        SearchIllnessFirst();
        if (first == 1)
        {
            try
            {
                ClassDataManager v = new ClassDataManager();
                v.AddIllness(TextBox2.Text, double.Parse(lblAdminID.Text));
                Response.Redirect("AddIllness.aspx?");
            }
            catch (Exception)
            {
                Response.Redirect("AddIllness.aspx?");
            }
        }
        if (first == 0)
        {

        }
    }
示例#35
0
    protected void btnsave_Click(object sender, EventArgs e)
    {
        TextBox txtdrug = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("txtdrug") as TextBox;
        TextBox txtgeneric = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("txtgeneric") as TextBox;
        TextBox txtbrand = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("txtbrand") as TextBox;

        double txtdrugcount = double.Parse(txtdrug.Text.Length.ToString());
        double txtgenericcount = double.Parse(txtgeneric.Text.Length.ToString());
        double txtbrandcount = double.Parse(txtbrand.Text.Length.ToString());

        try
        {

            ClassDataManager v = new ClassDataManager();
            Label lblAdminID = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("lblAdminID") as Label;
            v.AddMedicine(txtdrug.Text, txtgeneric.Text, txtbrand.Text, double.Parse(lblAdminID.Text));
            Response.Redirect("AddMedicine.aspx?");

        }
        catch (Exception)
        {
            Response.Redirect("AddMedicine.aspx");
        }
    }
 protected void LinkButton7_Click(object sender, EventArgs e)
 {
     try
     {
             ClassDataManager v = new ClassDataManager();
             Label lblAdminID = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("lblAdminID") as Label;
             Label Label16z = ArticleAvailableForms.ContentPlaceholder.Controls[0].FindControl("Label16z") as Label;
             v.AddFormsdrugs(double.Parse(Label16z.Text), double.Parse(Label4.Text), double.Parse(lblAdminID.Text));
             Response.Redirect("AddDrugSpecifications.aspx?DrugCode=" + double.Parse(Label4.Text));
     }
     catch (Exception)
     {
         Response.Redirect("AddDrugsSpecifications.aspx?DrugCode=" + double.Parse(Label4.Text));
     }
 }
 void home()
 {
     try
     {
         ClassDataManager v = new ClassDataManager();
         v.AddHomeRemedies(TextBox2.Text, double.Parse(Label6z.Text), double.Parse(lblAdminID.Text));
     }
     catch (Exception)
     {
         Response.Redirect("AddTreatMent.aspx?IllnessCode=" + int.Parse(Label6z.Text));
     }
 }
    protected void Button2_Click(object sender, EventArgs e)
    {
        SearchSideEffectsfirst();
        if (sidem == 0)
        {

        }
        if (sidem == 1)
        {

            try
            {
                Label lblAdminID = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("lblAdminID") as Label;
                    ClassDataManager v = new ClassDataManager();
                    v.AddDrugsideEFFECTS("•" + TextBox2.Text, double.Parse(lblAdminID.Text));
                    I();
                    v.AdddrugsEffects_Transactions(double.Parse(Label11.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 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));
     }
 }
 void ko()
 {
     try
     {
             ClassDataManager v = new ClassDataManager();
             Label lblAdminID = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("lblAdminID") as Label;
             v.AdddrugsEffects_Transactions(double.Parse(Label10.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 LinkButton6_Click(object sender, EventArgs e)
    {
        try
        {
            if (LinkButton6.Text == "[Click here] Save and Continue.")
            {
                ClassDataManager c = new ClassDataManager();
                c.AddDrugs_OILLNESS(double.Parse(Label9z.Text), double.Parse(lblAdminID.Text), double.Parse(Label6z.Text));
                LinkButton6.Visible = false;
            }
            if (LinkButton6.Text != "[Click here] Save and Continue.")
            {
                LinkButton6.Visible = false;
            }
        }
        catch (Exception)
        {

            throw;
        }
    }
    void addproceed2()
    {
        try
        {
            ClassDataManager v = new ClassDataManager();
            v.Addsymptoms_Proceed2(double.Parse(Label6z.Text), double.Parse(Label11z.Text), double.Parse(lblAdminID.Text));
            LinkButton4.Visible = false;
        }
        catch (Exception)
        {

            throw;
        }
    }
 void classx()
 {
     try
     {
         TextBox txtdrugclass = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("txtdrugclass") as TextBox;
             ClassDataManager v = new ClassDataManager();
             Label lblAdminID = ArticleMedicine.ContentPlaceholder.Controls[0].FindControl("lblAdminID") as Label;
             v.AdddrugsCLASSES_Transactions(double.Parse(Label2.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));
     }
 }