Esempio n. 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            FormSearchWorker w = new FormSearchWorker();
            Worker           selectedWorker = new Worker();

            w.ShowDialog();
            if (w.select)
            {
                selectedWorker.FullName = w.selectedW.FullName;
                selectedWorker.CNIC     = w.selectedW.CNIC;
                WorkerBLL wb = new WorkerBLL();
                if (wb.delWorker(selectedWorker))
                {
                    MessageBox.Show("Successfully Deleted....");
                }
                else
                {
                    MessageBox.Show("Unsuccessful.....");
                }
            }
        }
Esempio n. 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            FormSearchWorker frm = new FormSearchWorker();

            frm.ShowDialog();
            if (frm.select)
            {
                this.textBox1.Text    = frm.selectedW.FullName;
                this.textBox2.Text    = frm.selectedW.CNIC;
                this.textBox3.Text    = frm.selectedW.Address;
                this.textBox4.Text    = frm.selectedW.MobileNo;
                comboBox1.Text        = frm.selectedW.EmgContact;
                dateTimePicker1.Value = Convert.ToDateTime(frm.selectedW.JoinDate);
                if (frm.selectedW.IsActive == null)
                {
                    checkBox2.Checked = false;
                }
                else
                {
                    checkBox2.Checked = true;
                }
            }
        }