public void LoadFromObj(COProjectBudget oOrg) { miID = oOrg.ID; miProjectID = oOrg.ProjectID; miDepartmentID = oOrg.DepartmentID; mdBudgetHrs = oOrg.BudgetHrs; }
public void Copy(COProjectBudget oNew) { oNew.ID = miID; oNew.ProjectID = miProjectID; oNew.DepartmentID = miDepartmentID; oNew.BudgetHrs = mdBudgetHrs; }
private void LoadVals(string strXml) { XmlSerializer s; StringReader sr; s = new XmlSerializer(typeof(COProjectBudget)); sr = new System.IO.StringReader(strXml); oVar = new COProjectBudget(); oVar = (COProjectBudget)s.Deserialize(sr); sr.Close(); sr = null; s = null; }
public void LoadVals(string strXml) { XmlSerializer s; StringReader sr; COProjectBudget o; s = new XmlSerializer(typeof(COProjectBudget)); sr = new System.IO.StringReader(strXml); o = new COProjectBudget(); o = (COProjectBudget)s.Deserialize(sr); base.LoadFromObj(o); o = null; sr.Close(); sr = null; s = null; }
public string GetByDeptProj(int deptID, int projID) { SqlDataReader dr; RSLib.CDbConnection cnn; SqlCommand cmd; SqlParameter prm; string tmpStr = ""; cnn = new RSLib.CDbConnection(); cmd = new SqlCommand("spProjectBudget_ByDeptProj", cnn.GetConnection()); cmd.CommandType = CommandType.StoredProcedure; prm = cmd.Parameters.Add("@DepartmentID", SqlDbType.Int); prm.Value = deptID; prm = cmd.Parameters.Add("@ProjectID", SqlDbType.Int); prm.Value = projID; dr = cmd.ExecuteReader(CommandBehavior.CloseConnection); while (dr.Read()) { oVar = new COProjectBudget(); oVar.ID = Convert.ToInt32(dr["ID"]); oVar.ProjectID = Convert.ToInt32(dr["ProjectID"]); oVar.DepartmentID = Convert.ToInt32(dr["DepartmentID"]); oVar.BudgetHrs = Convert.ToDecimal(dr["BudgetHrs"]); tmpStr = GetDataString(); } dr.Close(); dr = null; prm = null; cmd = null; cnn.CloseConnection(); cnn = null; return(tmpStr); }
public string GetDataString() { string tmpStr; COProjectBudget o; XmlSerializer s; StringWriter sw; o = new COProjectBudget(); s = new XmlSerializer(typeof(COProjectBudget)); sw = new StringWriter(); base.Copy(o); s.Serialize(sw, o); tmpStr = sw.ToString(); o = null; s = null; sw = null; return(tmpStr); }