private void manager_Load(object sender, EventArgs e) { AddMedLabel.Hide(); deleteMedLabel.Hide(); checkStockLabel.Hide(); drugnameBox.Hide(); drugnameLabel.Hide(); categoryBox.Hide(); categoryLabel.Hide(); updateStocklabel.Hide(); descBox.Hide(); descLabel.Hide(); companyBox.Hide(); companyLabel.Hide(); supplierBox.Hide(); supplierLabel.Hide(); quantityBox.Hide(); quantityLabel.Hide(); costBox.Hide(); costLabel.Hide(); drugIDLabel.Hide(); drugIDBox.Hide(); statusLabel.Hide(); statusBox.Hide(); dateBox.Hide(); dateLabel.Hide(); AddButton.Hide(); deleteButton.Hide(); checkButton.Hide(); updateButton.Hide(); backButton.Hide(); clearButton.Hide(); }
private void Pressed() { string path = window.GetFilePath(); if (!path.Empty()) { string fileContents = System.IO.File.ReadAllText(path); editor.Text = fileContents; // Hide unneeded TextPreview textPreview = GetNode <TextPreview>("/root/Window/VB/MainHB/TextPreview"); textPreview.Hide(); VSeparator seperator = GetNode <VSeparator>("/root/Window/VB/MainHB/VSeparator"); seperator.Hide(); } else { AcceptDialog ad = GetNode <AcceptDialog>("/root/Window/Notifications/NoFile"); ad.Show(); GD.Print("Path is not set"); } this.Hide(); addButton.Hide(); saveButton.Show(); }
private void button3_Click(object sender, EventArgs e) { StudentDetailsButton.PerformClick(); FormPanel.Hide(); AddButton.Hide(); Update_Button.Hide(); }
//save button private void button1_Click(object sender, EventArgs e) { string connString = "Provider=Microsoft.ACE.OLEDB.12.0;" + "Data Source=E:\\ITS245\\STEFPROJ\\Database11.accdb"; OleDbConnection connection = new OleDbConnection(connString); OleDbCommand cmd = connection.CreateCommand(); connection.Open(); cmd.Connection = connection; cmd.CommandText = "Update familyhistorytable set Name =" + "'" + Nah.Text + "'" + ",Relation =" + "'" + Relationship.Text + "'" + ",MajorDisorder=" + "'" + MJ.Text + "'" + " where FamilyID=" + listBox1.SelectedItem.ToString(); OleDbDataReader reader2 = cmd.ExecuteReader(); reader2.Read(); reader2.Close(); this.BackColor = Color.LightBlue; Nah.ReadOnly = true; Relationship.ReadOnly = true; MJ.ReadOnly = true; button1.Hide(); AddButton.Hide(); }
private void AddButton_Click(object sender, EventArgs e) { string connString = "Provider=Microsoft.ACE.OLEDB.12.0;" + "Data Source=E:\\ITS245\\STEFPROJ\\Database11.accdb"; OleDbConnection connection = new OleDbConnection(connString); OleDbCommand cmd = connection.CreateCommand(); connection.Open(); cmd.CommandText = "Insert into familyhistorytable (PatientID,Name, Relation,MajorDisorder) VALUES" + "(" + "'" + PatientID.Text + "'" + "," + "'" + Nah.Text + "'" + "," + "'" + Relationship.Text + "'" + "," + "'" + MJ.Text + "'" + ")"; cmd.Connection = connection; OleDbDataReader reader = cmd.ExecuteReader(); connection.Close(); this.BackColor = Color.LightBlue; Nah.ReadOnly = true; Relationship.ReadOnly = true; MJ.ReadOnly = true; listBox1.Update(); AddButton.Hide(); button1.Hide(); }
////// Works fine but along with save button don't use apostrophe ///////// private void Add_Click(object sender, EventArgs e) { string connString = "Provider=Microsoft.ACE.OLEDB.12.0;" + "Data Source=E:\\ITS245\\STEFPROJ\\Database11.accdb"; OleDbConnection connection = new OleDbConnection(connString); OleDbCommand cmd = connection.CreateCommand(); connection.Open(); cmd.CommandText = "Insert into allergyhistorytable (PatientID,Allergen,AllergyDescription) VALUES" + "(" + "'" + PatientID.Text + "'" + "," + "'" + Allergen.Text + "'" + "," + "'" + Description.Text + "'" + ")"; cmd.Connection = connection; OleDbDataReader reader = cmd.ExecuteReader(); connection.Close(); this.BackColor = Color.LightBlue; Allergen.ReadOnly = true; Description.ReadOnly = true; Save.Hide(); AddButton.Hide(); }
//////// Working on undo button /////// private void Undo_Click(object sender, EventArgs e) { Modname Bmod = sender as Modname; string connString = "Provider=Microsoft.ACE.OLEDB.12.0;" + "Data Source=E:\\ITS245\\STEFPROJ\\Database11.accdb"; OleDbConnection connection = new OleDbConnection(connString); OleDbCommand cmd = connection.CreateCommand(); connection.Open(); cmd.CommandText = "Update allergyhistorytable set Allergen =" + "'" + Bmod.Allergen + "'" + ",AllergyDescription = " + "'" + Bmod.Allergen + "'" + " where AllergyID=" + listBox1.SelectedItem.ToString(); OleDbDataReader reader = cmd.ExecuteReader(); reader.Read(); reader.Close(); Allergen.ReadOnly = true; Description.ReadOnly = true; Save.Hide(); AddButton.Hide(); }
private void button4_Click(object sender, EventArgs e) { AddButton.Hide(); HorsesHighlight.BackColor = Color.White; RidersHighlight.BackColor = Color.White; LapsHighlight.BackColor = Color.White; SearchHighlight.BackColor = Color.FromArgb(192, 0, 0); Mode = 3; RefreshMainPanel(); }
private void PracticeButton_Click(object sender, EventArgs e) { PracticeControl practiceControl = new PracticeControl(); Controls.Add(practiceControl); practiceControl.Dock = DockStyle.Fill; practiceControl.Show(); TranslationGridView.Hide(); AddButton.Hide(); RemoveButton.Hide(); PracticeButton.Hide(); practiceModeToolStripMenuItem.Checked = true; editModeToolStripMenuItem.Checked = false; }
protected void OnAddButtonClicked(object sender, EventArgs e) { DoneLabel.Hide(); NameLabel.Show(); NameBox.Show(); TypeLabeld.Show(); Typebox.Show(); OwnerLabel.Show(); OwnerBox.Show(); AddButton.Hide(); ViewButton.Hide(); BackButton.Show(); DoneButton.Show(); HoursBox.Show(); HoursLabel.Show(); }
private void checkStockbutton_Click(object sender, EventArgs e) { addStockButton.Hide(); delStockButton.Hide(); checkStockbutton.Hide(); updateStockButton.Hide(); AddMedLabel.Hide(); deleteMedLabel.Hide(); checkStockLabel.Show(); updateStocklabel.Hide(); drugnameBox.Show(); drugnameLabel.Show(); categoryBox.Show(); categoryLabel.Show(); descBox.Show(); descLabel.Show(); companyBox.Show(); companyLabel.Show(); supplierBox.Show(); supplierLabel.Show(); quantityBox.Show(); quantityLabel.Show(); costBox.Show(); costLabel.Show(); drugIDLabel.Show(); drugIDBox.Show(); statusLabel.Hide(); statusBox.Hide(); dateBox.Show(); dateLabel.Show(); AddButton.Hide(); deleteButton.Hide(); checkButton.Show(); updateButton.Hide(); backButton.Show(); checkStock cs = new checkStock(); cs.Show(); this.Hide(); }
public ApplicationForm(bool val, string appNo) { // View Profile Form if (val == true) { InitializeComponent(); // Create a new datatble with the selcted user DbConnection d = new DbConnection(); DataTable theData = d.Select("SELECT * FROM Application WHERE ApplicationNumber = " + appNo); // Display values of the selected profile in the textboxes ApplicationNumber.Text = appNo; ApplicationNumber.ReadOnly = true; FirstName.Text = theData.Rows[0]["FirstName"].ToString(); FirstName.ReadOnly = true; LastName.Text = theData.Rows[0]["LastName"].ToString(); LastName.ReadOnly = true; CNIC.Text = theData.Rows[0]["CNIC"].ToString(); CNIC.ReadOnly = true; FatherName.Text = theData.Rows[0]["FatherName"].ToString(); FatherName.ReadOnly = true; DateInitiated.Value = DateTime.Parse(theData.Rows[0]["DateInitiated"].ToString()); DateInitiated.Enabled = false; CellNumber.Text = theData.Rows[0]["CellNo"].ToString(); CellNumber.ReadOnly = true; Address.Text = theData.Rows[0]["Address"].ToString(); Address.ReadOnly = true; if (theData.Rows[0]["Payment"].ToString() == "Monthly") { Monthly.Checked = true; Onetime.AutoCheck = false; } else if (theData.Rows[0]["Payment"].ToString() == "One Time") { Onetime.Checked = true; Monthly.AutoCheck = false; } AddButton.Visible = true; ViewDocButton.Visible = true; AddDocButton.Visible = false; } //Update Profile Form else if (val == false) { InitializeComponent(); // Create a new datatble with the selected user DbConnection db = new DbConnection(); DataTable theData = db.Select("SELECT * FROM Application WHERE ApplicationNumber = " + appNo); // Display values of the selected profile in the textboxes ApplicationNumber.Text = appNo; FirstName.Text = theData.Rows[0]["FirstName"].ToString(); LastName.Text = theData.Rows[0]["LastName"].ToString(); CNIC.Text = theData.Rows[0]["CNIC"].ToString(); FatherName.Text = theData.Rows[0]["FatherName"].ToString(); DateInitiated.Value = DateTime.Parse(theData.Rows[0]["DateInitiated"].ToString()); CellNumber.Text = theData.Rows[0]["CellNo"].ToString(); Address.Text = theData.Rows[0]["Address"].ToString(); if (theData.Rows[0]["Payment"].ToString() == "Monthly") { Monthly.Checked = true; } else if (theData.Rows[0]["Payment"].ToString() == "One Time") { Onetime.Checked = true; } AddButton.Hide(); UpdateButton.Show(); AddDocButton.Visible = true; } }
private void MainForm_Load(object sender, EventArgs e) { AddButton.Hide(); RemoveButton.Hide(); PracticeButton.Hide(); }