private void btnKaydet_Click(object sender, EventArgs e) { var student = new Student(); student.Firstname = textBox1.Text; student.Lastname = textBox2.Text; _serviceStudent.Insert(student); Clear(); GetData(); }
private void AddStudent() { try { Lesson L = new Lesson(textBoxL1.Text, textBoxL2.Text, textBoxL3.Text, Convert.ToInt32(textBoxG1.Text), Convert.ToInt32(textBoxG2.Text), Convert.ToInt32(textBoxG3.Text)); Student st = new Student(textBoxName.Text.ToUpper(), textBoxSurname.Text.ToUpper(), textBoxDep.Text.ToUpper(),Convert.ToInt32(textBoxNo.Text), L); StudentList.Add(st); MessageBox.Show("Success!"); } catch { ClearAllBoxes(); MessageBox.Show("Error Please attention to the number of inputs"); } }
private void GroupShow_Load(object sender, EventArgs e) { List<string> row = new List<string>(); int k = 0; for (int i = 0; i < ListOfStudentsInOneGroup.Count; i++) { row = ListOfStudentsInOneGroup[i]; if (row.Count != 0) { StudentdataGridView.Rows.Add(row[0], row[1], row[2], row[3]); k++; } else continue; } Student student = new Student(); student.StateColored(StudentdataGridView); }
public static extern int GetStudentRef(ref Student student);
public static extern int GetStudentPtr(ref Student student);
public static extern int GetStudent(Student student);
public void send_http_request(string req_method, string args, object obj) { string data = ""; if (req_method == "GET") data = agent.HttpGet(args); else if (req_method == "POST") data = agent.HttpPost(args, "dummy", "dummy"); else if (req_method == "PUT") data = agent.HttpPut(args, obj); //MessageBox.Show(data); JavaScriptSerializer jSerialize = new JavaScriptSerializer(); stud = jSerialize.Deserialize<Student>(data); //initialize student //string sb = "center = " + stud.ToString(); // MessageBox.Show(stud); //logBox1.Items.Add(sb); }