CS411 Assignment No 2 Solution Spring 2018
Here, I am providing you "Solution of CS-411 Assignment No 2
Note: Please don't make exact copy of this document and make Changes in this assignment, write it in your own words always correct any errors if you found. I am not responsible for zero Marking.
Update: If you want to source file in docx format then just visit the link given below to download Solution file of CS411
How to Download the File : Watch video below to see the steps to download file
Instructions
Steps 1: Click at link given above
2: Enter Captcha Code
3: Wait for 8 Seconds
4: Click at Link Generated below the captcha box
5: That's it. You have downloaded
Note: We guarantee you that our site is 100% Malware and virus free so please Please Disabled your Ad-blocker to Download the file from our site..
|
If you still facing any problem then please let me know about your problem regarding downloading file and leave a comment below because your feed back is very important to us to make our website more reliable and useful.
CS411 Assignment No. 2 Solution explanation is given below;
Submission:
You are required to submit your solution through LMS as a HTML file.
Solution:
Here is the coding of assignment 2 solution
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Xml.Linq;
using System.IO;
namespace CS411_Last_Solution
{
/// <summary>
/// Interaction logic
for MainWindow.xaml
/// </summary>
public partial class
MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void
buttonSave_Click(object sender, RoutedEventArgs e)
{
XDocument xdoc;
string myFile =
"YOUR ID .xml";
if(!File.Exists(myFile))
{
xdoc = new
XDocument(new XElement("xml"));
xdoc.Save(myFile);
}
xdoc = XDocument.Load(myFile);
xdoc.Element("xml").Add(new XElement("dtata", new
XAttribute("name", textboxName.Text),
new XAttribute("ID", textboxID.Text),
new
XAttribute("Cgpa", textboxCgpa.Text),
new XAttribute("Semester", textboxSemester.Text)
));
xdoc.Save(myFile);
MessageBox.Show("Data
Saved Successfully !");
textboxName.Text
= string.Empty;
textboxID.Text =
string.Empty;
textboxCgpa.Text
= string.Empty;
textboxSemester.Text = string.Empty;
}
private void
buttonReset_Click(object sender, RoutedEventArgs e)
{
textboxName.Text
= string.Empty;
textboxID.Text =
string.Empty;
textboxCgpa.Text
= string.Empty;
textboxSemester.Text = string.Empty;
}
}
}
NOTE: IF YOU FOUND ANY MISTAKE THEN CORRECT IT PLEASE DON’T MAKE EXACT COPY OF THIS SOLUTION, MAKE CHANGES TO AVOID ZERO MARKING. IM NOT RESPONSIBLE FOR IT.
0 Comments