Exemple #1
0
 public void LoadFromObj(COTransmittalSendTo oOrg)
 {
     miID         = oOrg.ID;
     miTransRelID = oOrg.TransRelID;
     msName       = oOrg.Name;
     miTypeID     = oOrg.TypeID;
     miQuantity   = oOrg.Quantity;
     mbIsOther    = oOrg.IsOther;
 }
Exemple #2
0
 public void Copy(COTransmittalSendTo oNew)
 {
     oNew.ID         = miID;
     oNew.TransRelID = miTransRelID;
     oNew.Name       = msName;
     oNew.TypeID     = miTypeID;
     oNew.Quantity   = miQuantity;
     oNew.IsOther    = mbIsOther;
 }
Exemple #3
0
        private void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;

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

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

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

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

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

            base.LoadFromObj(o);

            o = null;
            sr.Close();
            sr = null;
            s  = null;
        }
Exemple #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("spTransmittalSendTo_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 COTransmittalSendTo();

                oVar.ID         = Convert.ToInt32(dr["ID"]);
                oVar.TransRelID = Convert.ToInt32(dr["TransRelID"]);
                oVar.Name       = dr["Name"].ToString();
                oVar.TypeID     = Convert.ToInt32(dr["TypeID"]);
                oVar.Quantity   = Convert.ToInt32(dr["Quantity"]);
                oVar.IsOther    = Convert.ToBoolean(dr["IsOther"]);
                tmpStr          = GetDataString();
            }

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

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

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

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

            tmpStr = sw.ToString();

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

            return(tmpStr);
        }