コード例 #1
0
        private void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;

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

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

            sr.Close();
            sr = null;
            s  = null;
        }
コード例 #2
0
        public void LoadVals(string strXml)
        {
            XmlSerializer    s;
            StringReader     sr;
            COReleaseDrawing o;

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

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

            base.LoadFromObj(o);

            o = null;
            sr.Close();
            sr = null;
            s  = null;
        }
コード例 #3
0
        public string GetDataString()
        {
            string           tmpStr;
            COReleaseDrawing o;
            XmlSerializer    s;
            StringWriter     sw;

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

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

            tmpStr = sw.ToString();

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

            return(tmpStr);
        }
コード例 #4
0
        public string GetByID(int lID)
        {
            SqlDataReader dr;

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

            cnn             = new RSLib.CDbConnection();
            cmd             = new SqlCommand("spReleaseDrawing_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 COReleaseDrawing();

                oVar.ID      = Convert.ToInt32(dr["ID"]);
                oVar.Name    = dr["Name"].ToString();
                oVar.Ordinal = Convert.ToInt32(dr["Ordinal"]);
                tmpStr       = GetDataString();
            }

            dr  = null;
            prm = null;
            cmd = null;
            cnn.CloseConnection();
            cnn = null;

            return(tmpStr);
        }
コード例 #5
0
 public void LoadFromObj(COReleaseDrawing oOrg)
 {
     miID      = oOrg.ID;
     msName    = oOrg.Name;
     miOrdinal = oOrg.Ordinal;
 }
コード例 #6
0
 public void Copy(COReleaseDrawing oNew)
 {
     oNew.ID      = miID;
     oNew.Name    = msName;
     oNew.Ordinal = miOrdinal;
 }