public void LoadFromObj(COUnitOfMeasure oOrg) { miID = oOrg.ID; msUseCode = oOrg.UseCode; msCode = oOrg.Code; msDescription = oOrg.Description; miOrdinal = oOrg.Ordinal; }
public void Copy(COUnitOfMeasure oNew) { oNew.ID = miID; oNew.UseCode = msUseCode; oNew.Code = msCode; oNew.Description = msDescription; oNew.Ordinal = miOrdinal; }
private void LoadVals(string strXml) { XmlSerializer s; StringReader sr; s = new XmlSerializer(typeof(COUnitOfMeasure)); sr = new System.IO.StringReader(strXml); oVar = new COUnitOfMeasure(); oVar = (COUnitOfMeasure)s.Deserialize(sr); sr.Close(); sr = null; s = null; }
public void LoadVals(string strXml) { XmlSerializer s; StringReader sr; COUnitOfMeasure o; s = new XmlSerializer(typeof(COUnitOfMeasure)); sr = new System.IO.StringReader(strXml); o = new COUnitOfMeasure(); o = (COUnitOfMeasure)s.Deserialize(sr); base.LoadFromObj(o); o = null; sr.Close(); sr = null; s = null; }
public string GetDataString() { string tmpStr; COUnitOfMeasure o; XmlSerializer s; StringWriter sw; o = new COUnitOfMeasure(); s = new XmlSerializer(typeof(COUnitOfMeasure)); sw = new StringWriter(); base.Copy(o); s.Serialize(sw, o); tmpStr = sw.ToString(); o = null; s = null; sw = null; return(tmpStr); }
public string GetByID(int iID) { SqlDataReader dr; RSConnection cnn; SqlCommand cmd; SqlParameter prm; string tmpStr = ""; cnn = new RSConnection("CR"); cmd = new SqlCommand("spUnitOfMeasure_ByID", cnn.GetConnection()); cmd.CommandType = CommandType.StoredProcedure; prm = cmd.Parameters.Add("@ID", SqlDbType.Int); prm.Value = iID; dr = cmd.ExecuteReader(CommandBehavior.CloseConnection); while (dr.Read()) { oVar = new COUnitOfMeasure(); oVar.ID = Convert.ToInt32(dr["ID"]); oVar.UseCode = dr["UseCode"].ToString(); oVar.Code = dr["Code"].ToString(); oVar.Description = dr["Description"].ToString(); oVar.Ordinal = Convert.ToInt32(dr["Ordinal"]); tmpStr = GetDataString(); } dr.Close(); dr = null; prm = null; cmd = null; cnn.CloseConnection(); cnn = null; return(tmpStr); }