Example #1
0
 public void Copy(COBudgetPCNHour oNew)
 {
     oNew.ID           = miID;
     oNew.PCNID        = miPCNID;
     oNew.Code         = msCode;
     oNew.WBS          = msWBS;
     oNew.Description  = msDescription;
     oNew.Quantity     = miQuantity;
     oNew.HoursPerItem = miHoursPerItem;
     oNew.Rate         = mdRate;
     oNew.SubtotalHrs  = miSubtotalHrs;
     oNew.SubtotalDlrs = mdSubtotalDlrs;
 }
Example #2
0
 public void LoadFromObj(COBudgetPCNHour oOrg)
 {
     miID           = oOrg.ID;
     miPCNID        = oOrg.PCNID;
     msCode         = oOrg.Code;
     msWBS          = oOrg.WBS;
     msDescription  = oOrg.Description;
     miQuantity     = oOrg.Quantity;
     miHoursPerItem = oOrg.HoursPerItem;
     mdRate         = oOrg.Rate;
     miSubtotalHrs  = oOrg.SubtotalHrs;
     mdSubtotalDlrs = oOrg.SubtotalDlrs;
 }
Example #3
0
        private void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;

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

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

            sr.Close();
            sr = null;
            s  = null;
        }
Example #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("spBudgetPCNHour_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 COBudgetPCNHour();

                oVar.ID           = Convert.ToInt32(dr["ID"]);
                oVar.PCNID        = Convert.ToInt32(dr["PCNID"]);
                oVar.Code         = dr["Code"].ToString();
                oVar.WBS          = dr["WBS"].ToString();
                oVar.Description  = dr["Description"].ToString();
                oVar.Quantity     = Convert.ToInt32(dr["Quantity"]);
                oVar.HoursPerItem = Convert.ToInt32(dr["HoursPerItem"]);
                oVar.Rate         = Convert.ToDecimal(dr["Rate"]);
                oVar.SubtotalHrs  = Convert.ToInt32(dr["SubtotalHrs"]);
                oVar.SubtotalDlrs = Convert.ToDecimal(dr["SubtotalDlrs"]);
                tmpStr            = GetDataString();
            }

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

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

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

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

            base.LoadFromObj(o);

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

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

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

            tmpStr = sw.ToString();

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

            return(tmpStr);
        }