private void LoadVals(string strXml) { XmlSerializer s; StringReader sr; s = new XmlSerializer(typeof(COBudgetPCN)); sr = new System.IO.StringReader(strXml); oVar = new COBudgetPCN(); oVar = (COBudgetPCN)s.Deserialize(sr); sr.Close(); sr = null; s = null; }
public void LoadVals(string strXml) { XmlSerializer s; StringReader sr; COBudgetPCN o; s = new XmlSerializer(typeof(COBudgetPCN)); sr = new System.IO.StringReader(strXml); o = new COBudgetPCN(); o = (COBudgetPCN)s.Deserialize(sr); base.LoadFromObj(o); o = null; sr.Close(); sr = null; s = null; }
public void LoadFromObj(COBudgetPCN oOrg) { miID = oOrg.ID; miDepartmentID = oOrg.DepartmentID; miProjectID = oOrg.ProjectID; miBudgetID = oOrg.BudgetID; miInitiatedByID = oOrg.InitiatedByID; msPCNNumber = oOrg.PCNNumber; msPCNTitle = oOrg.PCNTitle; miPCNStatusID = oOrg.PCNStatusID; mdtDateInitiated = oOrg.DateInitiated; msRequestedBy = oOrg.RequestedBy; mdtDateRequested = oOrg.DateRequested; msDescOfChange = oOrg.DescOfChange; mbReasonDesignError = oOrg.ReasonDesignError; mbReasonVendorError = oOrg.ReasonVendorError; mbReasonEstimatingError = oOrg.ReasonEstimatingError; mbReasonContractorError = oOrg.ReasonContractorError; mbReasonSchedule = oOrg.ReasonSchedule; mbReasonScopeAdd = oOrg.ReasonScopeAdd; mbReasonScopeDel = oOrg.ReasonScopeDel; mbReasonDesignChange = oOrg.ReasonDesignChange; mbReasonOther = oOrg.ReasonOther; msOtherReasonDesc = oOrg.OtherReasonDesc; miEstimatedEngrHrs = oOrg.EstimatedEngrHrs; mdEstimatedEngrDlrs = oOrg.EstimatedEngrDlrs; mdEstimatedTICDlrs = oOrg.EstimatedTICDlrs; msEstimateAccuracy = oOrg.EstimateAccuracy; msScheduleImpact = oOrg.ScheduleImpact; mbIsApproved = oOrg.IsApproved; mbIsDisapproved = oOrg.IsDisapproved; mbPrepareControlEstimate = oOrg.PrepareControlEstimate; miProjectManagerID = oOrg.ProjectManagerID; mdtDateApproved = oOrg.DateApproved; mdtDateSubmittedToClient = oOrg.DateSubmittedToClient; mdtDateReceivedFromClient = oOrg.DateReceivedFromClient; msComments = oOrg.Comments; mdsPCNData = oOrg.PCNData; }
public void Copy(COBudgetPCN oNew) { oNew.ID = miID; oNew.DepartmentID = miDepartmentID; oNew.ProjectID = miProjectID; oNew.BudgetID = miBudgetID; oNew.InitiatedByID = miInitiatedByID; oNew.PCNNumber = msPCNNumber; oNew.PCNTitle = msPCNTitle; oNew.PCNStatusID = miPCNStatusID; oNew.DateInitiated = mdtDateInitiated; oNew.RequestedBy = msRequestedBy; oNew.DateRequested = mdtDateRequested; oNew.DescOfChange = msDescOfChange; oNew.ReasonDesignError = mbReasonDesignError; oNew.ReasonVendorError = mbReasonVendorError; oNew.ReasonEstimatingError = mbReasonEstimatingError; oNew.ReasonContractorError = mbReasonContractorError; oNew.ReasonSchedule = mbReasonSchedule; oNew.ReasonScopeAdd = mbReasonScopeAdd; oNew.ReasonScopeDel = mbReasonScopeDel; oNew.ReasonDesignChange = mbReasonDesignChange; oNew.ReasonOther = mbReasonOther; oNew.OtherReasonDesc = msOtherReasonDesc; oNew.EstimatedEngrHrs = miEstimatedEngrHrs; oNew.EstimatedEngrDlrs = mdEstimatedEngrDlrs; oNew.EstimatedTICDlrs = mdEstimatedTICDlrs; oNew.EstimateAccuracy = msEstimateAccuracy; oNew.ScheduleImpact = msScheduleImpact; oNew.IsApproved = mbIsApproved; oNew.IsDisapproved = mbIsDisapproved; oNew.PrepareControlEstimate = mbPrepareControlEstimate; oNew.ProjectManagerID = miProjectManagerID; oNew.DateApproved = mdtDateApproved; oNew.DateSubmittedToClient = mdtDateSubmittedToClient; oNew.DateReceivedFromClient = mdtDateReceivedFromClient; oNew.Comments = msComments; oNew.PCNData = mdsPCNData; }
public string GetDataString() { string tmpStr; COBudgetPCN o; XmlSerializer s; StringWriter sw; o = new COBudgetPCN(); s = new XmlSerializer(typeof(COBudgetPCN)); sw = new StringWriter(); base.Copy(o); s.Serialize(sw, o); tmpStr = sw.ToString(); o = null; s = null; sw = null; return(tmpStr); }
public string GetByID(int iID) { SqlDataReader dr; RSLib.CDbConnection cnn; SqlCommand cmd; SqlParameter prm; string tmpStr = ""; cnn = new RSLib.CDbConnection(); cmd = new SqlCommand("spBudgetPCN_ByID", cnn.GetConnection()); cmd.CommandType = CommandType.StoredProcedure; prm = cmd.Parameters.Add("@ID", SqlDbType.Int); prm.Value = iID; dr = cmd.ExecuteReader(CommandBehavior.CloseConnection); while (dr.Read()) { oVar = new COBudgetPCN(); oVar.ID = Convert.ToInt32(dr["ID"]); oVar.DepartmentID = Convert.ToInt32(dr["DepartmentID"]); oVar.ProjectID = Convert.ToInt32(dr["ProjectID"]); oVar.BudgetID = Convert.ToInt32(dr["BudgetID"]); oVar.InitiatedByID = Convert.ToInt32(dr["InitiatedByID"]); oVar.PCNNumber = dr["PCNNumber"].ToString(); oVar.PCNTitle = dr["PCNTitle"].ToString(); oVar.PCNStatusID = Convert.ToInt32(dr["PCNStatusID"]); oVar.DateInitiated = Convert.ToDateTime(dr["DateInitiated"]); oVar.RequestedBy = dr["RequestedBy"].ToString(); oVar.DateRequested = Convert.ToDateTime(dr["DateRequested"]); oVar.DescOfChange = dr["DescOfChange"].ToString(); oVar.ReasonDesignError = Convert.ToBoolean(dr["ReasonDesignError"]); oVar.ReasonVendorError = Convert.ToBoolean(dr["ReasonVendorError"]); oVar.ReasonEstimatingError = Convert.ToBoolean(dr["ReasonEstimatingError"]); oVar.ReasonContractorError = Convert.ToBoolean(dr["ReasonContractorError"]); oVar.ReasonSchedule = Convert.ToBoolean(dr["ReasonSchedule"]); oVar.ReasonScopeAdd = Convert.ToBoolean(dr["ReasonScopeAdd"]); oVar.ReasonScopeDel = Convert.ToBoolean(dr["ReasonScopeDel"]); oVar.ReasonDesignChange = Convert.ToBoolean(dr["ReasonDesignChange"]); oVar.ReasonOther = Convert.ToBoolean(dr["ReasonOther"]); oVar.OtherReasonDesc = dr["OtherReasonDesc"].ToString(); oVar.EstimatedEngrHrs = Convert.ToInt32(dr["EstimatedEngrHrs"]); oVar.EstimatedEngrDlrs = Convert.ToDecimal(dr["EstimatedEngrDlrs"]); oVar.EstimatedTICDlrs = Convert.ToDecimal(dr["EstimatedTICDlrs"]); oVar.EstimateAccuracy = dr["EstimateAccuracy"].ToString(); oVar.ScheduleImpact = dr["ScheduleImpact"].ToString(); oVar.IsApproved = Convert.ToBoolean(dr["IsApproved"]); oVar.IsDisapproved = Convert.ToBoolean(dr["IsDisapproved"]); oVar.PrepareControlEstimate = Convert.ToBoolean(dr["PrepareControlEstimate"]); oVar.ProjectManagerID = Convert.ToInt32(dr["ProjectManagerID"]); oVar.DateApproved = Convert.ToDateTime(dr["DateApproved"]); oVar.DateSubmittedToClient = Convert.ToDateTime(dr["DateSubmittedToClient"]); oVar.DateReceivedFromClient = Convert.ToDateTime(dr["DateReceivedFromClient"]); oVar.Comments = dr["Comments"].ToString(); tmpStr = GetDataString(); } dr.Close(); dr = null; prm = null; cmd = null; cnn.CloseConnection(); cnn = null; return(tmpStr); }