private void gcGVDK_Click(object sender, EventArgs e) { DateTime currentDateTime1 = DateTime.Now; this.txtNgayThi.MinDate = currentDateTime1.AddDays(-1000); DateTime currentDateTime = DateTime.Now; this.txtNgayThi.MaxDate = currentDateTime.AddDays(60); DataRowView current = (DataRowView)bs_GVDK.Current; String x = current["MAMH"].ToString(); String nameMH = SqlRequestFunction.GetTenMH(x); this.txtMH2.Text = nameMH; String y = current["MALOP"].ToString(); String nameLOP = SqlRequestFunction.GetTenLop(y); this.txtMaLop1.Text = nameLOP; String z = current["TRINHDO"].ToString(); String TrinhDo = GetLevelName(z); this.txtTrinhDo1.Text = TrinhDo; String t = current["NGAYTHI"].ToString(); this.txtNgayThi.Text = t; }
public void set() { if (bs_GVDK.Count == 0) { btn_Add.Enabled = true; btn_Edit.Enabled = btn_Ghi.Enabled = btn_Delete.Enabled = btn_Reload.Enabled = btn_Thoat.Enabled = btn_Reset.Enabled = false; this.groupBox1.Enabled = false; } else { btn_Ghi.Enabled = false; this.btn_Reset.Enabled = true; this.groupBox1.Enabled = false; this.txtMH2.Visible = this.txtMaLop1.Visible = this.txtTrinhDo1.Visible = true; gcGVDK.Enabled = true; /*DataRowView current1 = (DataRowView)bs_GVDK.Current * * /*String maGV = current1["MAGV"].ToString(); * this.bs_GVDK.Position = FindPointionCurrentTeacher(maGV);*/ DataRowView current = (DataRowView)bs_GVDK.Current; String x = current["MAMH"].ToString(); this.txtMaMH.Text = x; String nameMH = SqlRequestFunction.GetTenMH(x); this.txtMH2.Text = nameMH; String y = current["MALOP"].ToString(); String nameLOP = SqlRequestFunction.GetTenLop(y); this.txtMaLop1.Text = nameLOP; String z = current["TRINHDO"].ToString(); String TrinhDo = GetLevelName(z); this.txtTrinhDo1.Text = TrinhDo; DateTime currentDateTime = DateTime.Now; this.txtNgayThi.MinDate = currentDateTime.AddDays(-1000); this.txtNgayThi.MaxDate = currentDateTime.AddDays(60); String t = current["NGAYTHI"].ToString(); this.txtNgayThi.Text = t; } }
public void set() { btn_Write.Enabled = false; this.btn_Reset.Enabled = true; this.groupBox1.Enabled = false; this.txtMH1.Visible = this.txtTrinhDo1.Visible = true; DataRowView current = (DataRowView)bs_BoDe.Current; String x = current["MAMH"].ToString(); String nameMH = SqlRequestFunction.GetTenMH(x); this.txtMH1.Text = nameMH; String z = current["TRINHDO"].ToString(); String TrinhDo = GetLevelName(z); this.txtTrinhDo1.Text = TrinhDo; }
private void SetUp() { if (Program.mGroup.Equals("SINHVIEN")) { StudentInfo studentInfo = SqlRequestFunction.GetStudentInfo(Program.username); this.lbl_StudentCode.Text = Program.username; this.lbl_StudentName.Text = studentInfo.FullName; this.lbl_ClassCode.Text = studentInfo.ClassCode; this.lbl_ClassName.Text = studentInfo.ClassName; } this.dtp_DateExam.MinDate = DateTime.Now; DateTime currentDateTime = DateTime.Now; this.dtp_DateExam.MaxDate = currentDateTime.AddDays(60); this.grb_StartExam.Visible = false; string x = this.cmb_Course.SelectedValue.ToString(); String nameMH = SqlRequestFunction.GetTenMH(x); this.txtMH.Text = nameMH; }