Esempio n. 1
0
        public DataSet GetTcBase(string tID)
        {
            DataSet tcBaseInfoList;

            using (TeacherBaseDataAccess tcBaseDA = new TeacherBaseDataAccess())
            {
                tcBaseInfoList = tcBaseDA.GetTcBaseInfo(tID);
            }

            return(tcBaseInfoList);
        }
Esempio n. 2
0
        //查询用户指定的工号是否已经存在
        public bool hasSameNumber(string tcNumber, string tcID)
        {
            DataSet getSameNumber = teacherBaseDA.GetTcBaseInfo("", "", "", tcNumber);

            if (getSameNumber.Tables[0].Rows.Count > 0)
            {
                //允许修改自身数据
                if (getSameNumber.Tables[0].Rows[0][0].ToString().Equals(tcID))
                {
                    tchBase.TNumber = tcNumber;
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                tchBase.TNumber = tcNumber;
                return(true);
            }
        }