Exemplo n.º 1
0
 public void LoadFromObj(COWeekList oOrg)
 {
     miID          = oOrg.ID;
     mdStartOfWeek = oOrg.StartOfWeek;
     mdEndOfWeek   = oOrg.EndOfWeek;
     miNumber      = oOrg.Number;
     msDisplayVal  = oOrg.DisplayVal;
 }
Exemplo n.º 2
0
 public void Copy(COWeekList oNew)
 {
     oNew.ID          = miID;
     oNew.StartOfWeek = mdStartOfWeek;
     oNew.EndOfWeek   = mdEndOfWeek;
     oNew.Number      = miNumber;
     oNew.DisplayVal  = msDisplayVal;
 }
Exemplo n.º 3
0
        private void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;

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

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

            sr.Close();
            sr = null;
            s  = null;
        }
Exemplo n.º 4
0
        public void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;
            COWeekList    o;

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

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

            base.LoadFromObj(o);

            o = null;
            sr.Close();
            sr = null;
            s  = null;
        }
Exemplo n.º 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("spWeekList_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 COWeekList();

                oVar.ID          = Convert.ToInt32(dr["ID"]);
                oVar.StartOfWeek = Convert.ToDateTime(dr["StartOfWeek"]);
                oVar.EndOfWeek   = Convert.ToDateTime(dr["EndOfWeek"]);
                oVar.Number      = Convert.ToInt32(dr["Number"]);
                oVar.DisplayVal  = dr["DisplayVal"].ToString();
                tmpStr           = GetDataString();
            }

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

            return(tmpStr);
        }
Exemplo n.º 6
0
        public string GetDataString()
        {
            string        tmpStr;
            COWeekList    o;
            XmlSerializer s;
            StringWriter  sw;

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

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

            tmpStr = sw.ToString();

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

            return(tmpStr);
        }