示例#1
0
 public void LoadFromObj(COTransmittalDoc oOrg)
 {
     miID            = oOrg.ID;
     miTransmittalID = oOrg.TransmittalID;
     miReleaseDocID  = oOrg.ReleaseDocID;
     miCopies        = oOrg.Copies;
     msDocDwgNo      = oOrg.DocDwgNo;
     msRevision      = oOrg.Revision;
     mdtDateTrans    = oOrg.DateTrans;
     msDescription   = oOrg.Description;
 }
示例#2
0
 public void Copy(COTransmittalDoc oNew)
 {
     oNew.ID            = miID;
     oNew.TransmittalID = miTransmittalID;
     oNew.ReleaseDocID  = miReleaseDocID;
     oNew.Copies        = miCopies;
     oNew.DocDwgNo      = msDocDwgNo;
     oNew.Revision      = msRevision;
     oNew.DateTrans     = mdtDateTrans;
     oNew.Description   = msDescription;
 }
示例#3
0
        private void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;

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

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

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

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

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

            base.LoadFromObj(o);

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

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

            cnn             = new RSLib.CDbConnection();
            cmd             = new SqlCommand("spTransmittalDoc_ByID", cnn.GetConnection());
            cmd.CommandType = CommandType.StoredProcedure;

            prm       = cmd.Parameters.Add("@ID", SqlDbType.Int);
            prm.Value = iID;

            dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);

            while (dr.Read())
            {
                oVar               = new COTransmittalDoc();
                oVar.ID            = Convert.ToInt32(dr["ID"]);
                oVar.TransmittalID = Convert.ToInt32(dr["TransmittalID"]);
                oVar.ReleaseDocID  = Convert.ToInt32(dr["ReleaseDocID"]);
                oVar.Copies        = Convert.ToInt32(dr["Copies"]);
                oVar.DocDwgNo      = dr["DocDwgNo"].ToString();
                oVar.Revision      = dr["Revision"].ToString();
                oVar.DateTrans     = Convert.ToDateTime(dr["DateTrans"]);
                oVar.Description   = dr["Description"].ToString();
                tmpStr             = GetDataString();
            }
            dr.Close();
            dr  = null;
            prm = null;
            cmd = null;
            cnn.CloseConnection();
            cnn = null;

            return(tmpStr);
        }
示例#6
0
        public string GetDataString()
        {
            string           tmpStr;
            COTransmittalDoc o;
            XmlSerializer    s;
            StringWriter     sw;

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

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

            tmpStr = sw.ToString();

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

            return(tmpStr);
        }