public void LoadFromObj(CODrawingSize oOrg) { miID = oOrg.ID; msCode = oOrg.Code; msSize = oOrg.Size; miOrdinal = oOrg.Ordinal; }
public void Copy(CODrawingSize oNew) { oNew.ID = miID; oNew.Code = msCode; oNew.Size = msSize; oNew.Ordinal = miOrdinal; }
private void LoadVals(string strXml) { XmlSerializer s; StringReader sr; s = new XmlSerializer(typeof(CODrawingSize)); sr = new System.IO.StringReader(strXml); oVar = new CODrawingSize(); oVar = (CODrawingSize)s.Deserialize(sr); sr.Close(); sr = null; s = null; }
public void LoadVals(string strXml) { XmlSerializer s; StringReader sr; CODrawingSize o; s = new XmlSerializer(typeof(CODrawingSize)); sr = new System.IO.StringReader(strXml); o = new CODrawingSize(); o = (CODrawingSize)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("spDrawingSize_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 CODrawingSize(); oVar.ID = Convert.ToInt32(dr["ID"]); oVar.Code = dr["Code"].ToString(); oVar.Size = dr["Size"].ToString(); oVar.Ordinal = Convert.ToInt32(dr["Ordinal"]); tmpStr = GetDataString(); } dr = null; prm = null; cmd = null; cnn.CloseConnection(); cnn = null; return(tmpStr); }
public string GetDataString() { string tmpStr; CODrawingSize o; XmlSerializer s; StringWriter sw; o = new CODrawingSize(); s = new XmlSerializer(typeof(CODrawingSize)); sw = new StringWriter(); base.Copy(o); s.Serialize(sw, o); tmpStr = sw.ToString(); o = null; s = null; sw = null; return(tmpStr); }