Beispiel #1
0
 public void LoadFromObj(COProjectBudget oOrg)
 {
     miID           = oOrg.ID;
     miProjectID    = oOrg.ProjectID;
     miDepartmentID = oOrg.DepartmentID;
     mdBudgetHrs    = oOrg.BudgetHrs;
 }
Beispiel #2
0
 public void Copy(COProjectBudget oNew)
 {
     oNew.ID           = miID;
     oNew.ProjectID    = miProjectID;
     oNew.DepartmentID = miDepartmentID;
     oNew.BudgetHrs    = mdBudgetHrs;
 }
Beispiel #3
0
        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;
        }
Beispiel #4
0
        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;
        }
Beispiel #5
0
        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);
        }
Beispiel #6
0
        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);
        }