コード例 #1
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            // call form and change form text to ADD
            RecordsFunctionsForm adminadd = new RecordsFunctionsForm();

            adminadd.Text          = "ADD";
            adminadd.FunctionUsers = UserUsers;
            adminadd.ShowDialog();
            this.Close();
        }
コード例 #2
0
        private void BtnSearch_Click(object sender, EventArgs e)
        {
            //opens search function form
            RecordsFunctionsForm adminrecordssearch1 = new RecordsFunctionsForm();

            trial = "Select Records.RecordId, Records.RecordName, Records.Description, Shipping.Quantity, Records.Year, Records.Price from Records inner join Shipping on Records.RecordId = Shipping.RecordId where ";
            adminrecordssearch1.Text          = "SEARCH";
            adminrecordssearch1.FunctionUsers = userUsers;
            adminrecordssearch1.ShowDialog();
            this.Close();
        }
コード例 #3
0
 private void BtnEdit_Click(object sender, EventArgs e)
 {
     // checks if mtd fields are empty and opens edit user function form when fields are not empty.
     if (string.IsNullOrEmpty(mtdRecord) || string.IsNullOrEmpty(mtdDesc) || string.IsNullOrEmpty(mtdYear) || Id == 0)
     {
         MessageBox.Show("Select Row to be Edited!");
     }
     else
     {
         RecordsFunctionsForm admineditrecords1 = new RecordsFunctionsForm();
         admineditrecords1.Text = "EDIT";
         admineditrecords1.SetFieldsToBeEdited(Id, mtdRecord, mtdDesc, mtdYear, mtdPrice);
         admineditrecords1.FunctionUsers = UserUsers;
         admineditrecords1.ShowDialog();
         this.Close();
         Clear();
     }
 }