public void LoadFromObj(COUserLevel oOrg) { miID = oOrg.ID; miUserID = oOrg.UserID; miDepartmentID = oOrg.DepartmentID; miSecurityLevelID = oOrg.SecurityLevelID; miSecurityLevelIDJS = oOrg.SecurityLevelIDJS; miSecurityLevelIDDRW = oOrg.SecurityLevelIDDRW; }
public void Copy(COUserLevel oNew) { oNew.ID = miID; oNew.UserID = miUserID; oNew.DepartmentID = miDepartmentID; oNew.SecurityLevelID = miSecurityLevelID; oNew.SecurityLevelIDJS = miSecurityLevelIDJS; oNew.SecurityLevelIDDRW = miSecurityLevelIDDRW; }
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; }
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; }
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); }
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); }