示例#1
0
 public void LoadFromObj(CORateSchedule oOrg)
 {
     miID           = oOrg.ID;
     msName         = oOrg.Name;
     msDescription  = oOrg.Description;
     mdDefaultRate  = oOrg.DefaultRate;
     mdMultiplier   = oOrg.Multiplier;
     mdOverlay      = oOrg.Overlay;
     mbIsMultiplier = oOrg.IsMultiplier;
     miOrdinal      = oOrg.Ordinal;
 }
示例#2
0
 public void Copy(CORateSchedule oNew)
 {
     oNew.ID           = miID;
     oNew.Name         = msName;
     oNew.Description  = msDescription;
     oNew.DefaultRate  = mdDefaultRate;
     oNew.Multiplier   = mdMultiplier;
     oNew.Overlay      = mdOverlay;
     oNew.IsMultiplier = mbIsMultiplier;
     oNew.Ordinal      = miOrdinal;
 }
示例#3
0
        private void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;

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

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

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

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

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

                oVar.ID           = Convert.ToInt32(dr["ID"]);
                oVar.Name         = dr["Name"].ToString();
                oVar.Description  = dr["Description"].ToString();
                oVar.DefaultRate  = Convert.ToDecimal(dr["DefaultRate"]);
                oVar.Multiplier   = Convert.ToDecimal(dr["Multiplier"]);
                oVar.Overlay      = Convert.ToDecimal(dr["Overlay"]);
                oVar.IsMultiplier = Convert.ToBoolean(dr["IsMultiplier"]);
                oVar.Ordinal      = Convert.ToInt32(dr["Ordinal"]);
                tmpStr            = GetDataString();
            }

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

            return(tmpStr);
        }
示例#5
0
        public void LoadVals(string strXml)
        {
            XmlSerializer  s;
            StringReader   sr;
            CORateSchedule o;

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

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

            base.LoadFromObj(o);

            o = null;
            sr.Close();
            sr = null;
            s  = null;
        }
示例#6
0
        public string GetDataString()
        {
            string         tmpStr;
            CORateSchedule o;
            XmlSerializer  s;
            StringWriter   sw;

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

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

            tmpStr = sw.ToString();

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

            return(tmpStr);
        }