public void LoadFromObj(COProjectEmployee oOrg) { miID = oOrg.ID; miProjectID = oOrg.ProjectID; miEmployeeID = oOrg.EmployeeID; miDepartmentID = oOrg.DepartmentID; }
public void Copy(COProjectEmployee oNew) { oNew.ID = miID; oNew.ProjectID = miProjectID; oNew.EmployeeID = miEmployeeID; oNew.DepartmentID = miDepartmentID; }
private void LoadVals(string strXml) { XmlSerializer s; StringReader sr; s = new XmlSerializer(typeof(COProjectEmployee)); sr = new System.IO.StringReader(strXml); oVar = new COProjectEmployee(); oVar = (COProjectEmployee)s.Deserialize(sr); sr.Close(); sr = null; s = null; }
public void LoadVals(string strXml) { XmlSerializer s; StringReader sr; COProjectEmployee o; s = new XmlSerializer(typeof(COProjectEmployee)); sr = new System.IO.StringReader(strXml); o = new COProjectEmployee(); o = (COProjectEmployee)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("spProjectEmployee_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 COProjectEmployee(); oVar.ID = Convert.ToInt32(dr["ID"]); oVar.ProjectID = Convert.ToInt32(dr["ProjectID"]); oVar.EmployeeID = Convert.ToInt32(dr["EmployeeID"]); oVar.DepartmentID = Convert.ToInt32(dr["DepartmentID"]); tmpStr = GetDataString(); } dr.Close(); dr = null; prm = null; cmd = null; cnn.CloseConnection(); cnn = null; return(tmpStr); }
public string GetDataString() { string tmpStr; COProjectEmployee o; XmlSerializer s; StringWriter sw; o = new COProjectEmployee(); s = new XmlSerializer(typeof(COProjectEmployee)); sw = new StringWriter(); base.Copy(o); s.Serialize(sw, o); tmpStr = sw.ToString(); o = null; s = null; sw = null; return(tmpStr); }