Beispiel #1
0
        private void UpdateButton_Click(object sender, EventArgs e)
        {
            int sem = (int)sem_u.Value;
            int sub = (int)sub_u.Value;
            int mar = (int)mar_u.Value;

            ServiceReference2.MarksManageServiceClient client = new ServiceReference2.MarksManageServiceClient();
            string CID    = Form2.clgid;
            string result = client.UpdateMarks(CID, sem, sub, mar);

            ServiceReference2.MarksRecords[] myMarks;

            if (result == null)
            {
                MessageBox.Show("Invalid Updation");
            }
            else
            {
                myMarks = client.SearchByID(CID);

                listView1.Items.Clear();
                foreach (var marksRecord in myMarks)
                {
                    var row = new string[] { marksRecord.Semester.ToString(), marksRecord.Subject1.ToString(), marksRecord.Subject2.ToString(), marksRecord.Subject3.ToString() };
                    var lvi = new ListViewItem(row);
                    lvi.Tag = marksRecord;
                    listView1.Items.Add(lvi);
                }

                MessageBox.Show(result);
            }
        }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            ServiceReference2.MarksManageServiceClient          client = new ServiceReference2.MarksManageServiceClient();
            MarksManagementClient.ServiceReference2.UserDetails u      = new ServiceReference2.UserDetails();
            u.UserID   = textBox2.Text;
            u.UserName = textBox1.Text;
            u.Password = textBox3.Text;
            client.Register(u);
            this.Hide();
            Form2 f2 = new Form2();

            f2.ShowDialog();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            ServiceReference2.MarksManageServiceClient client = new ServiceReference2.MarksManageServiceClient();
            string CollageId = textBox1.Text;
            string Password  = textBox2.Text;

            clgid = CollageId;
            string Username = client.Login(CollageId, Password);

            if (Username != null)
            {
                this.Hide();
                Form4 f4 = new Form4();
                f4.ShowDialog();
            }
            else
            {
                this.Hide();
                Form3 f3 = new Form3();
                f3.ShowDialog();
            }
        }
Beispiel #4
0
        private void DeleteButton_Click(object sender, EventArgs e)
        {
            int    delete_sem = (int)DelSem.Value;
            string CID        = Form2.clgid;

            ServiceReference2.MarksManageServiceClient client = new ServiceReference2.MarksManageServiceClient();

            client.DeleteMarksRecordBySem(CID, delete_sem);
            ServiceReference2.MarksRecords[] myMarks;
            myMarks = client.SearchByID(CID);

            listView1.Items.Clear();
            foreach (var marksRecord in myMarks)
            {
                var row = new string[] { marksRecord.Semester.ToString(), marksRecord.Subject1.ToString(), marksRecord.Subject2.ToString(), marksRecord.Subject3.ToString() };
                var lvi = new ListViewItem(row);
                lvi.Tag = marksRecord;
                listView1.Items.Add(lvi);
            }


            MessageBox.Show("Record deleted successfully");
        }
Beispiel #5
0
        private void SearchID_TextChanged(object sender, EventArgs e)
        {
            string search_ID = SearchID.Text;

            ServiceReference2.MarksManageServiceClient client = new ServiceReference2.MarksManageServiceClient();
            // MarksManagementClient.ServiceReference2.MarksRecords u = new ServiceReference2.MarksRecords();
            ServiceReference2.MarksRecords[] Marks;
            Marks = client.SearchByID(search_ID);
            if (Marks == null)
            {
                listView1.Items.Clear();
            }
            else
            {
                listView1.Items.Clear();
                foreach (var marksRecord in Marks)
                {
                    var row = new string[] { marksRecord.Semester.ToString(), marksRecord.Subject1.ToString(), marksRecord.Subject2.ToString(), marksRecord.Subject3.ToString() };
                    var lvi = new ListViewItem(row);
                    lvi.Tag = marksRecord;
                    listView1.Items.Add(lvi);
                }
            }
        }
Beispiel #6
0
        private void button1_Click(object sender, EventArgs e)
        {
            ServiceReference2.MarksManageServiceClient           client = new ServiceReference2.MarksManageServiceClient();
            MarksManagementClient.ServiceReference2.MarksRecords u      = new ServiceReference2.MarksRecords();
            //ServiceReference2.MarksRecords marks = new ServiceReference2.MarksRecords();
            u.UserID   = Form2.clgid;
            u.Semester = (int)numericUpDown1.Value;
            u.Subject1 = (int)numericUpDown2.Value;
            u.Subject2 = (int)numericUpDown3.Value;
            u.Subject3 = (int)numericUpDown4.Value;

            string result = client.AddMarks(u);

            if (result == null)
            {
                MessageBox.Show("Invalid Updation");
            }
            else
            {
                this.Hide();
                Form5 f5 = new Form5();
                f5.ShowDialog();
            }
        }