protected void InsertBtn_Click(object sender, EventArgs e)
 {
     if (IsValid)
     {
         StudentSource.InsertParameters["St_Name"].DefaultValue    = NameTxt.Text;
         StudentSource.InsertParameters["St_Age"].DefaultValue     = AgeTxt.Text;
         StudentSource.InsertParameters["St_Address"].DefaultValue = AddressTxt.Text;
         StudentSource.InsertParameters["Dept_Id"].DefaultValue    = DepartmentList.SelectedValue;
         StudentSource.Insert();
     }
 }
 public static void CopyToMethodTest()
 {
     //StudentSource studentSource = new StudentSource() { StudentName = "Molly Shannon", StudentAge = 17, SchoolName = "Grandville High School", SchoolPosition = new List<double>() { 119, 911 }, SchoolCityName = "Gotham" };
     //Student student = null;
     //studentSource.CopyPropertyValueTo(ref student);
     StudentSource = new StudentSource()
     {
         StudentName = "Molly Shannon", StudentAge = 17, SchoolName = "Grandville High School", SchoolPosition = new List <double>()
         {
             119, 911
         }, SchoolCityName = "Gotham"
     };
     Student = null;
     StudentSource.CopyPropertyValueTo(ref Student);
 }
 public static void CopyFromMethodTest()
 {
     //StudentSource studentSource = new StudentSource();
     //Student student = new Student() { Name = "Molly Shannon", Age = 17, School = new School() { Name = "Grandville High School", Position = new List<double>() { 119, 911 }, City = new City() { Name = "Gotham" } } };
     //studentSource.CopyPropertyValueFrom(student);
     StudentSource = new StudentSource();
     Student       = new Student()
     {
         Name = "Molly Shannon", Age = 17, School = new School()
         {
             Name = "Grandville High School", Position = new List <double>()
             {
                 119, 911
             }, City = new City()
             {
                 Name = "Gotham"
             }
         }
     };
     StudentSource.CopyPropertyValueFrom(Student);
 }