Example #1
0
        private void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;

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

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

            sr.Close();
            sr = null;
            s  = null;
        }
Example #2
0
        public void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;
            COPCNStatus   o;

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

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

            base.LoadFromObj(o);

            o = null;
            sr.Close();
            sr = null;
            s  = null;
        }
Example #3
0
        public string GetDataString()
        {
            string        tmpStr;
            COPCNStatus   o;
            XmlSerializer s;
            StringWriter  sw;

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

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

            tmpStr = sw.ToString();

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

            return(tmpStr);
        }
Example #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("spPCNStatus_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 COPCNStatus();

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

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

            return(tmpStr);
        }
Example #5
0
 public void LoadFromObj(COPCNStatus oOrg)
 {
     miID          = oOrg.ID;
     msStatus      = oOrg.Status;
     msDescription = oOrg.Description;
 }
Example #6
0
 public void Copy(COPCNStatus oNew)
 {
     oNew.ID          = miID;
     oNew.Status      = msStatus;
     oNew.Description = msDescription;
 }