Exemplo n.º 1
0
 public void LoadFromObj(CODocumentReleaseType oOrg)
 {
     miID      = oOrg.ID;
     msCode    = oOrg.Code;
     msName    = oOrg.Name;
     miOrdinal = oOrg.Ordinal;
 }
Exemplo n.º 2
0
 public void Copy(CODocumentReleaseType oNew)
 {
     oNew.ID      = miID;
     oNew.Code    = msCode;
     oNew.Name    = msName;
     oNew.Ordinal = miOrdinal;
 }
Exemplo n.º 3
0
        private void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;

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

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

            sr.Close();
            sr = null;
            s  = null;
        }
Exemplo n.º 4
0
        public void LoadVals(string strXml)
        {
            XmlSerializer         s;
            StringReader          sr;
            CODocumentReleaseType o;

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

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

            base.LoadFromObj(o);

            o = null;
            sr.Close();
            sr = null;
            s  = null;
        }
Exemplo n.º 5
0
        public string GetDataString()
        {
            string tmpStr;
            CODocumentReleaseType o;
            XmlSerializer         s;
            StringWriter          sw;

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

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

            tmpStr = sw.ToString();

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

            return(tmpStr);
        }
Exemplo n.º 6
0
        public string GetByID(int iID)
        {
            SqlDataReader dr;

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

            cnn             = new RSLib.CDbConnection();
            cmd             = new SqlCommand("spDocumentReleaseType_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 CODocumentReleaseType();
                oVar.ID      = Convert.ToInt32(dr["ID"]);
                oVar.Code    = dr["Code"].ToString();
                oVar.Name    = dr["Name"].ToString();
                oVar.Ordinal = Convert.ToInt32(dr["Ordinal"]);
                tmpStr       = GetDataString();
            }
            dr.Close();
            dr  = null;
            prm = null;
            cmd = null;
            cnn.CloseConnection();
            cnn = null;

            return(tmpStr);
        }