예제 #1
0
 public void LoadFromObj(COProject oOrg)
 {
     miID                 = oOrg.ID;
     msNumber             = oOrg.Number;
     msDescription        = oOrg.Description;
     miCustomerID         = oOrg.CustomerID;
     msCustomerProjNumber = oOrg.CustomerProjNumber;
     miLocationID         = oOrg.LocationID;
     miProjMngrID         = oOrg.ProjMngrID;
     miLeadProjMngrID     = oOrg.LeadProjMngrID;
     miRelationshipMngrID = oOrg.RelationshipMngrID;
     miRateSchedID        = oOrg.RateSchedID;
     mdMultiplier         = oOrg.Multiplier;
     mdOverlay            = oOrg.Overlay;
     msNotes              = oOrg.Notes;
     mdDateStart          = oOrg.DateStart;
     mdDateEnd            = oOrg.DateEnd;
     mbIsProposal         = oOrg.IsProposal;
     mbIsBooked           = oOrg.IsBooked;
     mbIsActive           = oOrg.IsActive;
     mbIsGovernment       = oOrg.IsGovernment;
     mbIsmaster           = oOrg.IsMaster;
     miMasterID           = oOrg.MasterID;
     miReportingStatus    = oOrg.ReportingStatus;
     mdBudget             = oOrg.Budget;
     msPOAmnt             = oOrg.POAmount;
     mbIsFixedRate        = oOrg.IsFixedRate;
 }
예제 #2
0
        public void Copy(COProject oNew)
        {
            oNew.ID                 = miID;
            oNew.Number             = msNumber;
            oNew.Description        = msDescription;
            oNew.CustomerID         = miCustomerID;
            oNew.CustomerProjNumber = msCustomerProjNumber;
            oNew.LocationID         = miLocationID;
            oNew.ProjMngrID         = miProjMngrID;
            oNew.LeadProjMngrID     = miLeadProjMngrID;
            oNew.RelationshipMngrID = miRelationshipMngrID;
            oNew.RateSchedID        = miRateSchedID;
            oNew.Multiplier         = mdMultiplier;
            oNew.Overlay            = mdOverlay;
            oNew.Notes              = msNotes;
            oNew.DateStart          = mdDateStart;
            oNew.DateEnd            = mdDateEnd;
            oNew.IsProposal         = mbIsProposal;
            oNew.IsBooked           = mbIsBooked;
            oNew.IsActive           = mbIsActive;
            oNew.IsGovernment       = mbIsGovernment;
            oNew.IsMaster           = mbIsmaster;
            oNew.MasterID           = miMasterID;
            oNew.ReportingStatus    = miReportingStatus;
            oNew.Budget             = mdBudget;
            oNew.POAmount           = msPOAmnt;

            oNew.mbIsFixedRate = mbIsFixedRate;//********************************************************
        }
예제 #3
0
        public string GetByNumber(string number)
        {
            SqlDataReader dr;

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

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


            prm       = cmd.Parameters.Add("@Number", SqlDbType.VarChar, 50);
            prm.Value = number;

            dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);


            while (dr.Read())
            {
                oVar = new COProject();

                oVar.ID                 = Convert.ToInt32(dr["ID"]);
                oVar.Number             = dr["Number"].ToString();
                oVar.Description        = dr["Description"].ToString();
                oVar.CustomerID         = Convert.ToInt32(dr["CustomerID"]);
                oVar.CustomerProjNumber = dr["CustomerProjNumber"].ToString();
                oVar.LocationID         = Convert.ToInt32(dr["LocationID"]);
                oVar.ProjMngrID         = Convert.ToInt32(dr["ProjMngrID"]);
                oVar.LeadProjMngrID     = Convert.ToInt32(dr["LeadProjMngrID"]);
                oVar.RelationshipMngrID = Convert.ToInt32(dr["RelationshipMngrID"]);
                oVar.RateSchedID        = Convert.ToInt32(dr["RateSchedID"]);
                oVar.Multiplier         = Convert.ToDecimal(dr["Multiplier"]);
                oVar.Overlay            = Convert.ToDecimal(dr["Overlay"]);
                oVar.Notes              = dr["Notes"].ToString();
                oVar.DateStart          = Convert.ToDateTime(dr["DateStart"]);
                oVar.DateEnd            = Convert.ToDateTime(dr["DateEnd"]);
                oVar.IsProposal         = Convert.ToBoolean(dr["IsProposal"]);
                oVar.IsBooked           = Convert.ToBoolean(dr["IsBooked"]);
                oVar.IsActive           = Convert.ToBoolean(dr["IsActive"]);
                oVar.IsGovernment       = Convert.ToBoolean(dr["IsGovernment"]);
                oVar.IsMaster           = Convert.ToBoolean(dr["IsMaster"]);
                oVar.MasterID           = Convert.ToInt32(dr["MasterID"]);
                oVar.ReportingStatus    = Convert.ToInt32(dr["ReportingStatus"]);
                oVar.Budget             = Convert.ToDecimal(dr["Budget"]);
                oVar.POAmount           = dr["POAmount"].ToString();
                tmpStr = GetDataString();
            }

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

            return(tmpStr);
        }
예제 #4
0
 public void LoadFromObj_Description(COProject oOrg) //*************************Added 7/8/2015
 {
     miID           = oOrg.ID;
     msNumber       = oOrg.Number;
     msDescription  = oOrg.Description;
     miCustomerID   = oOrg.CustomerID;
     msCustomerName = oOrg.CustomerName;
     miLocationID   = oOrg.LocationID;
     msCity         = oOrg.City;
     msState        = oOrg.State;
 }
예제 #5
0
        private void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;

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

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

            sr.Close();
            sr = null;
            s  = null;
        }
예제 #6
0
        public string GetByID_Description(int lID) //************************Added 7/8/2015
        {
            SqlDataReader dr;

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

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

                oVar.ID           = Convert.ToInt32(dr["ID"]);
                oVar.Number       = dr["Number"].ToString();
                oVar.Description  = dr["Description"].ToString();
                oVar.CustomerID   = Convert.ToInt32(dr["CustomerID"]);
                oVar.CustomerName = dr["CustomerName"].ToString();
                oVar.LocationID   = Convert.ToInt32(dr["LocationID"]);
                oVar.City         = dr["City"].ToString();
                oVar.State        = dr["State"].ToString();
                tmpStr            = GetDataString();
            }

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

            return(tmpStr);
        }
예제 #7
0
        public void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;
            COProject     o;

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

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

            base.LoadFromObj(o);

            o = null;
            sr.Close();
            sr = null;
            s  = null;
        }
예제 #8
0
        public void LoadVals_Description(string strXml) //****************************Added 7/8/2015
        {
            XmlSerializer s;
            StringReader  sr;
            COProject     o;

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

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

            base.LoadFromObj_Description(o);

            o = null;
            sr.Close();
            sr = null;
            s  = null;
        }
예제 #9
0
        public string GetDataString()
        {
            string        tmpStr;
            COProject     o;
            XmlSerializer s;
            StringWriter  sw;

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

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

            tmpStr = sw.ToString();

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

            return(tmpStr);
        }