示例#1
0
 public void LoadFromObj(COUserLevel oOrg)
 {
     miID                 = oOrg.ID;
     miUserID             = oOrg.UserID;
     miDepartmentID       = oOrg.DepartmentID;
     miSecurityLevelID    = oOrg.SecurityLevelID;
     miSecurityLevelIDJS  = oOrg.SecurityLevelIDJS;
     miSecurityLevelIDDRW = oOrg.SecurityLevelIDDRW;
 }
示例#2
0
 public void Copy(COUserLevel oNew)
 {
     oNew.ID                 = miID;
     oNew.UserID             = miUserID;
     oNew.DepartmentID       = miDepartmentID;
     oNew.SecurityLevelID    = miSecurityLevelID;
     oNew.SecurityLevelIDJS  = miSecurityLevelIDJS;
     oNew.SecurityLevelIDDRW = miSecurityLevelIDDRW;
 }
示例#3
0
        private void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;

            s  = new XmlSerializer(typeof(COUserLevel));
            sr = new System.IO.StringReader(strXml);

            oVar = new COUserLevel();
            oVar = (COUserLevel)s.Deserialize(sr);

            sr.Close();
            sr = null;
            s  = null;
        }
示例#4
0
        public void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;
            COUserLevel   o;

            s  = new XmlSerializer(typeof(COUserLevel));
            sr = new System.IO.StringReader(strXml);

            o = new COUserLevel();
            o = (COUserLevel)s.Deserialize(sr);

            base.LoadFromObj(o);

            o = null;
            sr.Close();
            sr = null;
            s  = null;
        }
示例#5
0
        public string GetByID(int lID)
        {
            SqlDataReader dr;

            RSLib.CDbConnection cnn;
            SqlCommand          cmd;
            SqlParameter        prm;
            string tmpStr = "";

            cnn             = new RSLib.CDbConnection();
            cmd             = new SqlCommand("spUserLevel_ByID", cnn.GetConnection());
            cmd.CommandType = CommandType.StoredProcedure;


            prm       = cmd.Parameters.Add("@ID", SqlDbType.Int);
            prm.Value = lID;

            dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);


            while (dr.Read())
            {
                oVar = new COUserLevel();

                oVar.ID              = Convert.ToInt32(dr["ID"]);
                oVar.UserID          = Convert.ToInt32(dr["UserID"]);
                oVar.DepartmentID    = Convert.ToInt32(dr["DepartmentID"]);
                oVar.SecurityLevelID = Convert.ToInt32(dr["SecurityLevelID"]);
                //oVar.SecurityLevelIDJS = Convert.ToInt32(dr["SecurityLevelIDJS"]);
                //oVar.SecurityLevelIDDRW = Convert.ToInt32(dr["SecurityLevelIDDRW"]);
                tmpStr = GetDataString();
            }

            dr  = null;
            prm = null;
            cmd = null;
            cnn.CloseConnection();
            cnn = null;

            return(tmpStr);
        }
示例#6
0
        public string GetDataString()
        {
            string        tmpStr;
            COUserLevel   o;
            XmlSerializer s;
            StringWriter  sw;

            o  = new COUserLevel();
            s  = new XmlSerializer(typeof(COUserLevel));
            sw = new StringWriter();

            base.Copy(o);
            s.Serialize(sw, o);

            tmpStr = sw.ToString();

            o  = null;
            s  = null;
            sw = null;

            return(tmpStr);
        }