Example #1
0
        public string GetByID(int lID)
        {
            SqlDataReader dr;

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

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

                oVar.ID = Convert.ToInt32(dr["ID"]);
                Console.WriteLine("The ID is: " + Convert.ToInt32(dr["ID"]));
                Console.WriteLine("The lID is: " + lID);

                oVar.ProjSumID    = Convert.ToInt32(dr["ProjSumID"]);
                oVar.ProjectID    = Convert.ToInt32(dr["ProjectID"]);
                oVar.Schedule     = dr["Schedule"].ToString();
                oVar.ActHigh      = dr["ActHigh"].ToString();
                oVar.StaffNeeds   = dr["StaffNeeds"].ToString();
                oVar.CFeedBack    = dr["CFeedBack"].ToString();
                oVar.POAmt        = Convert.ToDecimal(dr["POAmt"]);
                oVar.BilledtoDate = Convert.ToDecimal(dr["BilledtoDate"]);
                oVar.PaidtoDate   = Convert.ToDecimal(dr["PaidtoDate"]);
                oVar.Outstanding  = Convert.ToDecimal(dr["Outstanding"]);
                //oVar.Client = dr["Client"].ToString();
                //oVar.Job = dr["Job"].ToString();
                //oVar.Location = dr["Location"].ToString();
                tmpStr = GetDataString();
            }

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

            return(tmpStr);
        }
Example #2
0
        private void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;

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

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

            sr.Close();
            sr = null;
            s  = null;
        }
Example #3
0
 public void LoadFromObj(COProjectSummaryInfo oOrg)
 {
     miID               = oOrg.ID;
     miProjSumID        = oOrg.ProjSumID;
     miProjectID        = oOrg.ProjectID;
     msSchedule         = oOrg.Schedule;
     msActHigh          = oOrg.ActHigh;
     msStaffNeeds       = oOrg.StaffNeeds;
     msCFeedBack        = oOrg.CFeedBack;
     mdPOAmt            = oOrg.POAmt;
     mdBilledtoDate     = oOrg.BilledtoDate;
     mdPaidtoDate       = oOrg.PaidtoDate;
     mdOutstanding      = oOrg.Outstanding;
     mdDateLastModified = oOrg.DateLastModified;
     //msClient = oOrg.Client;
     //msJob = oOrg.Job;
     //msLocation = oOrg.msLocation;
 }
Example #4
0
        public void Copy(COProjectSummaryInfo oNew)
        {
            oNew.ID               = miID;
            oNew.ProjSumID        = miProjSumID;
            oNew.ProjectID        = miProjectID;
            oNew.Schedule         = msSchedule;
            oNew.ActHigh          = msActHigh;
            oNew.StaffNeeds       = msStaffNeeds;
            oNew.CFeedBack        = msCFeedBack;
            oNew.POAmt            = mdPOAmt;
            oNew.BilledtoDate     = mdBilledtoDate;
            oNew.PaidtoDate       = mdPaidtoDate;
            oNew.Outstanding      = mdOutstanding;
            oNew.DateLastModified = mdDateLastModified;

            //oNew.Client = msClient;
            //oNew.Job = msJob;
            //oNew.Location = msLocation;
        }