private void getInforEdit(int mssv, int class_id)
        {
            //create new sv form mssv by delegate
            SV s = CDSL_Handle.Instance.getSVbyMSSV(mssv);

            txt_mssv.Text      = s.MSSV.ToString();
            txt_name.Text      = s.NameSV;
            dtp_birthday.Value = Convert.ToDateTime(s.Birthday);

            int indexClass = CDSL_Handle.Instance.getIndexLSH(class_id);

            cbb_LSH.SelectedItem = cbb_LSH.Items[indexClass + 1];
            LSH lop = CDSL_Handle.Instance.getLSHById(class_id);


            if (s.Gender)
            {
                radio_male.Checked = true;
            }
            else
            {
                radioFemale.Checked = true;
            }
            txt_mssv.Enabled = false;
        }
        public LSH createLSH(DataRow i)
        {
            LSH l = new LSH();

            l.ID_Class  = Convert.ToInt32(i["ID_Class"].ToString());
            l.NameClass = i["NameClass"].ToString();
            return(l);
        }
示例#3
0
文件: CSDL_OOP.cs 项目: VILAIDED/QLSV
        public LSH GetLSHById(int ID_Lop)
        {
            LSH lsh = new LSH();

            foreach (LSH ls in GetAllLSH())
            {
                if (ID_Lop == ls.ID_Lop)
                {
                    lsh = ls;
                    break;
                }
            }
            return(lsh);
        }