Skip to content

Commit 6d64049

Browse files
committed
Final commit.
It's over. :P
1 parent 9c2d8e8 commit 6d64049

12 files changed

+1644
-374
lines changed

mymlas/Bill_Page.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ public Bill_Page(int ch,String bid) throws SQLException {
4141
jTextField1.setText(""+bd);
4242
jTextField2.setText(""+rs.getString("Patient_Name"));
4343
jTextField4.setText(""+rs.getString("Test_Name"));
44-
Connect.sql = "SELECT * FROM tests WHERE Test_Name="+ rs.getString("Test_Name") +";";
44+
Connect.sql = "SELECT * FROM tests WHERE Test_Name='"+ rs.getString("Test_Name") +"';";
4545
rs = Connect.stmt.executeQuery(Connect.sql);
4646
rs.next();
47-
jTextField5.setText(""+rs.getInt("TestCharges"));
47+
jTextField5.setText(""+rs.getInt("Test_Charges"));
4848
if (ch==2)
4949
jButton1.setText("Confirm");
5050
}
@@ -336,10 +336,9 @@ else if (chn==2)
336336
{
337337
try {
338338
Connect.create_Connection();
339-
Connect.sql = "INSERT INTO bills (Doctor_Name,Test_Date,Collection_date,Status) VALUES ('"+ jTextField3.getText() +"','"+ jComboBox1.getSelectedItem().toString() + "-" + jComboBox2.getSelectedItem().toString() + "-" + jComboBox3.getSelectedItem().toString() + " 00:00:01','" + jComboBox4.getSelectedItem().toString() + "-" + jComboBox5.getSelectedItem().toString() + "-" + jComboBox6.getSelectedItem().toString() + " " + jComboBox7.getSelectedItem().toString() + ":" + jComboBox2.getSelectedItem().toString() + ":00',1);";
339+
Connect.sql = "UPDATE bills SET Doctor_Name='"+jTextField3.getText()+"',Test_Date='"+jComboBox1.getSelectedItem().toString() + "-" + jComboBox2.getSelectedItem().toString() + "-" + jComboBox3.getSelectedItem().toString() + " 00:00:01',Collection_date='"+ jComboBox4.getSelectedItem().toString() + "-" + jComboBox5.getSelectedItem().toString() + "-" + jComboBox6.getSelectedItem().toString() + " " + jComboBox7.getSelectedItem().toString() + ":" + jComboBox2.getSelectedItem().toString() + ":00',Status=1 WHERE id="+bd+";";
340340
Connect.stmt.executeUpdate(Connect.sql);
341-
Connect.stmt.close();
342-
Connect.sql = "DELETE FROM notifications WHERE bid= '" + bd +";";
341+
Connect.sql = "DELETE FROM notifications WHERE Bill_id= " + bd +";";
343342
Connect.stmt.executeUpdate(Connect.sql);
344343
Connect.stmt.close();
345344
Management_home mh = null;

mymlas/Home.java

+3
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,14 @@ public void mouseClicked(MouseEvent e)
4242
jPanel3.setVisible(false);
4343
jPanel4.setVisible(true);
4444
jTextField1.setVisible(true);
45+
jTextField2.setVisible(false);
4546
jLabel8.setText("Patient Name");
4647
jLabel9.setVisible(false);
4748
jButton2.setVisible(true);
4849
jButton4.setVisible(true);
4950
jButton5.setVisible(true);
51+
jTextField1.setText("");
52+
jTextField1.setEditable(true);
5053
}
5154
});
5255
jLabel5.addMouseListener(new MouseAdapter()

mymlas/Management.java

+8-5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import java.sql.ResultSet;
99
import java.sql.SQLException;
1010
import java.util.Vector;
11+
import javax.swing.JOptionPane;
1112

1213
/**
1314
*
@@ -68,12 +69,13 @@ public void remove_Test(String test) throws SQLException{
6869
Connect.sql = "DELETE FROM Tests WHERE Test_Name= '" + test + "';";
6970
Connect.stmt.executeUpdate(Connect.sql);
7071
Connect.stmt.close();
72+
JOptionPane.showMessageDialog(null,"Done.\n");
7173
//tests_.removeElement(test);
72-
for (Test tests_1 : tests_) {
73-
if (tests_1.get_Testname().equals(test))
74-
tests_.remove(tests_1);
75-
num_Tests_--;
76-
}
74+
for (int i=0;i<tests_.size();i++)
75+
if (tests_.get(i).equals(test))
76+
{ tests_.remove(i);
77+
num_Tests_--;
78+
}
7779
}
7880

7981

@@ -109,6 +111,7 @@ public boolean edit_Test(Test prev_Test, Test new_Test) throws SQLException {
109111
}
110112
Connect.sql = "UPDATE Tests SET Test_Name = '" + new_Test.get_Testname() + "',Test_Charges = " + new_Test.get_Testcharges() + " WHERE Test_Name = '" + prev_Test.get_Testname() + "' AND Test_Charges = " + prev_Test.get_Testcharges() + ";";
111113
Connect.stmt.executeUpdate(Connect.sql);
114+
JOptionPane.showMessageDialog(null,"Done.\n");
112115
for(int i = 0;i < num_Tests_;i++){
113116
if(list_Tests(i) == prev_Test){
114117
list_Tests(i).set_Testname(new_Test.get_Testname());

mymlas/Management_home.form

+46-4
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@
372372
<Color blue="ff" green="ff" red="ff" type="rgb"/>
373373
</Property>
374374
<Property name="horizontalAlignment" type="int" value="0"/>
375-
<Property name="text" type="java.lang.String" value="Place Order"/>
375+
<Property name="text" type="java.lang.String" value="Place Order on Existing Stock"/>
376376
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
377377
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
378378
<LineBorder thickness="2">
@@ -396,7 +396,7 @@
396396
<Color blue="ff" green="ff" red="ff" type="rgb"/>
397397
</Property>
398398
<Property name="horizontalAlignment" type="int" value="0"/>
399-
<Property name="text" type="java.lang.String" value="Cancel Order"/>
399+
<Property name="text" type="java.lang.String" value="Change Order Status"/>
400400
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
401401
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
402402
<LineBorder thickness="2">
@@ -444,7 +444,7 @@
444444
<Color blue="ff" green="ff" red="ff" type="rgb"/>
445445
</Property>
446446
<Property name="horizontalAlignment" type="int" value="0"/>
447-
<Property name="text" type="java.lang.String" value="Replenish All Stocks"/>
447+
<Property name="text" type="java.lang.String" value="Place Order for New Stocks"/>
448448
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
449449
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
450450
<LineBorder thickness="2">
@@ -521,6 +521,7 @@
521521
<Color blue="ff" green="ff" red="ff" type="rgb"/>
522522
</Property>
523523
<Property name="text" type="java.lang.String" value="Previous"/>
524+
<Property name="opaque" type="boolean" value="false"/>
524525
</Properties>
525526
<Constraints>
526527
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
@@ -541,7 +542,11 @@
541542
</Property>
542543
<Property name="text" type="java.lang.String" value="Next"/>
543544
<Property name="toolTipText" type="java.lang.String" value=""/>
545+
<Property name="opaque" type="boolean" value="false"/>
544546
</Properties>
547+
<Events>
548+
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/>
549+
</Events>
545550
<Constraints>
546551
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
547552
<AbsoluteConstraints x="490" y="80" width="450" height="-1"/>
@@ -560,7 +565,11 @@
560565
<Color blue="ff" green="ff" red="ff" type="rgb"/>
561566
</Property>
562567
<Property name="text" type="java.lang.String" value="Take Action"/>
568+
<Property name="opaque" type="boolean" value="false"/>
563569
</Properties>
570+
<Events>
571+
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/>
572+
</Events>
564573
<Constraints>
565574
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
566575
<AbsoluteConstraints x="20" y="430" width="920" height="40"/>
@@ -595,7 +604,40 @@
595604
</Properties>
596605
<Constraints>
597606
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
598-
<AbsoluteConstraints x="40" y="260" width="880" height="50"/>
607+
<AbsoluteConstraints x="40" y="250" width="880" height="50"/>
608+
</Constraint>
609+
</Constraints>
610+
</Component>
611+
<Component class="javax.swing.JLabel" name="jLabel29">
612+
<Properties>
613+
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
614+
<Font name="Century Gothic" size="14" style="0"/>
615+
</Property>
616+
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
617+
<Color blue="cc" green="cc" red="cc" type="rgb"/>
618+
</Property>
619+
<Property name="horizontalAlignment" type="int" value="4"/>
620+
<Property name="text" type="java.lang.String" value="ID :"/>
621+
</Properties>
622+
<Constraints>
623+
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
624+
<AbsoluteConstraints x="40" y="340" width="800" height="50"/>
625+
</Constraint>
626+
</Constraints>
627+
</Component>
628+
<Component class="javax.swing.JLabel" name="jLabel11">
629+
<Properties>
630+
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
631+
<Font name="Century Gothic" size="14" style="0"/>
632+
</Property>
633+
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
634+
<Color blue="cc" green="cc" red="cc" type="rgb"/>
635+
</Property>
636+
<Property name="text" type="java.lang.String" value="No."/>
637+
</Properties>
638+
<Constraints>
639+
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
640+
<AbsoluteConstraints x="858" y="340" width="70" height="50"/>
599641
</Constraint>
600642
</Constraints>
601643
</Component>

0 commit comments

Comments
 (0)