Esempio n. 1
0
        private void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;

            //s = new XmlSerializer(typeof(COEmployeeTitle));
            s = new XmlSerializer(typeof(COLog));

            sr = new System.IO.StringReader(strXml);

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

            sr.Close();
            sr = null;
            s  = null;
        }
Esempio n. 2
0
        //public void Load(int iID)
        //{
        //    //CDbEmployeeTitle dbDt = new CDbEmployeeTitle();
        //    CDbLog dbDt = new CDbLog();
        //    string tmpDat;

        //    tmpDat = dbDt.GetByID(iID);

        //    Clear();
        //    if (tmpDat.Length > 0)
        //        LoadVals(tmpDat);

        //    dbDt = null;
        //}

        public void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;
            COLog         o;

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

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

            base.LoadFromObj(o);

            o = null;
            sr.Close();
            sr = null;
            s  = null;
        }
Esempio n. 3
0
        //public static void Delete(int cID)
        //{
        //    CDbEmployeeTitle dbDt = new CDbEmployeeTitle();

        //    dbDt.Delete(cID);
        //}


        public string GetDataString()
        {
            string        tmpStr;
            COLog         o;
            XmlSerializer s;
            StringWriter  sw;

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

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

            tmpStr = sw.ToString();

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

            return(tmpStr);
        }
Esempio n. 4
0
 public void LoadFromObj(COLog oOrg)
 {
     miID   = oOrg.ID;
     msName = oOrg.Name;
 }
Esempio n. 5
0
 // public void Copy(COEmployeeTitle oNew)
 public void Copy(COLog oNew)
 {
     oNew.ID   = miID;
     oNew.Name = msName;
 }