Example #1
0
 public void LoadFromObj(COLocation oOrg)
 {
     miID         = oOrg.ID;
     miCustomerID = oOrg.CustomerID;
     msCity       = oOrg.City;
     miStateID    = oOrg.StateID;
 }
Example #2
0
 public void Copy(COLocation oNew)
 {
     oNew.ID         = miID;
     oNew.CustomerID = miCustomerID;
     oNew.City       = msCity;
     oNew.StateID    = miStateID;
 }
Example #3
0
        private void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;

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

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

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

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

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

            base.LoadFromObj(o);

            o = null;
            sr.Close();
            sr = null;
            s  = null;
        }
Example #5
0
        public string GetByID(int lID)
        {
            SqlDataReader dr;

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

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

                oVar.ID         = Convert.ToInt32(dr["ID"]);
                oVar.CustomerID = Convert.ToInt32(dr["CustomerID"]);
                oVar.City       = dr["City"].ToString();
                oVar.StateID    = Convert.ToInt32(dr["StateID"]);
                tmpStr          = GetDataString();
            }

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

            return(tmpStr);
        }
Example #6
0
        public string GetDataString()
        {
            string        tmpStr;
            COLocation    o;
            XmlSerializer s;
            StringWriter  sw;

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

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

            tmpStr = sw.ToString();

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

            return(tmpStr);
        }