Beispiel #1
0
        private void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;

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

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

            sr.Close();
            sr = null;
            s  = null;
        }
Beispiel #2
0
 public void LoadFromObj(COBudgetExpenseSheet oOrg)
 {
     miID          = oOrg.ID;
     miBudgetID    = oOrg.BudgetID;
     miDeptGroup   = oOrg.DeptGroup;
     msWorkGuid    = oOrg.WorkGuid;
     msDescription = oOrg.Description;
     miQuantity    = oOrg.Quantity;
     miRoundTrips  = oOrg.RoundTrips;
     miPeople      = oOrg.People;
     miNumDays     = oOrg.NumDays;
     miNumNights   = oOrg.NumNights;
     miHoursPerDay = oOrg.HoursPerDay;
     miTravelHours = oOrg.TravelHours;
     miE110        = oOrg.E110;
     miE120        = oOrg.E120;
     miE130        = oOrg.E130;
     miE140        = oOrg.E140;
     miE150        = oOrg.E150;
     miE160        = oOrg.E160;
     miE170        = oOrg.E170;
     miE180        = oOrg.E180;
     miE190        = oOrg.E190;
     miE281        = oOrg.E281;
     miE282        = oOrg.E282;
     miE283        = oOrg.E283;
     miE284        = oOrg.E284;
     miE290        = oOrg.E290;
     miE310        = oOrg.E310;
     miE320        = oOrg.E320;
     miE330        = oOrg.E330;
     miE340        = oOrg.E340;
     miE350        = oOrg.E350;
     miE541        = oOrg.E541;
     miE542        = oOrg.E542;
     miE543        = oOrg.E543;
     miE561        = oOrg.E561;
     miE562        = oOrg.E562;
     miE580        = oOrg.E580;
     miE591        = oOrg.E591;
     miE592        = oOrg.E592;
     miE593        = oOrg.E593;
     miE594        = oOrg.E594;
     miE595        = oOrg.E595;
     msRemarks     = oOrg.Remarks;
 }
Beispiel #3
0
 public void Copy(COBudgetExpenseSheet oNew)
 {
     oNew.ID          = miID;
     oNew.BudgetID    = miBudgetID;
     oNew.DeptGroup   = miDeptGroup;
     oNew.WorkGuid    = msWorkGuid;
     oNew.Description = msDescription;
     oNew.Quantity    = miQuantity;
     oNew.RoundTrips  = miRoundTrips;
     oNew.People      = miPeople;
     oNew.NumDays     = miNumDays;
     oNew.NumNights   = miNumNights;
     oNew.HoursPerDay = miHoursPerDay;
     oNew.TravelHours = miTravelHours;
     oNew.E110        = miE110;
     oNew.E120        = miE120;
     oNew.E130        = miE130;
     oNew.E140        = miE140;
     oNew.E150        = miE150;
     oNew.E160        = miE160;
     oNew.E170        = miE170;
     oNew.E180        = miE180;
     oNew.E190        = miE190;
     oNew.E281        = miE281;
     oNew.E282        = miE282;
     oNew.E283        = miE283;
     oNew.E284        = miE284;
     oNew.E290        = miE290;
     oNew.E310        = miE310;
     oNew.E320        = miE320;
     oNew.E330        = miE330;
     oNew.E340        = miE340;
     oNew.E350        = miE350;
     oNew.E541        = miE541;
     oNew.E542        = miE542;
     oNew.E543        = miE543;
     oNew.E561        = miE561;
     oNew.E562        = miE562;
     oNew.E580        = miE580;
     oNew.E591        = miE591;
     oNew.E592        = miE592;
     oNew.E593        = miE593;
     oNew.E594        = miE594;
     oNew.E595        = miE595;
     oNew.Remarks     = msRemarks;
 }
Beispiel #4
0
        public void LoadVals(string strXml)
        {
            XmlSerializer        s;
            StringReader         sr;
            COBudgetExpenseSheet o;

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

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

            base.LoadFromObj(o);

            o = null;
            sr.Close();
            sr = null;
            s  = null;
        }
Beispiel #5
0
        public string GetDataString()
        {
            string tmpStr;
            COBudgetExpenseSheet o;
            XmlSerializer        s;
            StringWriter         sw;

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

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

            tmpStr = sw.ToString();

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

            return(tmpStr);
        }
Beispiel #6
0
        public string GetByID(int lID)
        {
            SqlDataReader dr;

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

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

                oVar.ID          = Convert.ToInt32(dr["ID"]);
                oVar.BudgetID    = Convert.ToInt32(dr["BudgetID"]);
                oVar.DeptGroup   = Convert.ToInt32(dr["DeptGroup"]);
                oVar.WorkGuid    = dr["WorkGuid"].ToString();
                oVar.Description = dr["Description"].ToString();
                oVar.Quantity    = Convert.ToInt32(dr["Quantity"]);
                oVar.RoundTrips  = Convert.ToInt32(dr["RoundTrips"]);
                oVar.People      = Convert.ToInt32(dr["People"]);
                oVar.NumDays     = Convert.ToInt32(dr["NumDays"]);
                oVar.NumNights   = Convert.ToInt32(dr["NumNights"]);
                oVar.HoursPerDay = Convert.ToInt32(dr["HoursPerDay"]);
                oVar.TravelHours = Convert.ToInt32(dr["TravelHours"]);
                oVar.E110        = Convert.ToInt32(dr["E110"]);
                oVar.E120        = Convert.ToInt32(dr["E120"]);
                oVar.E130        = Convert.ToInt32(dr["E130"]);
                oVar.E140        = Convert.ToInt32(dr["E140"]);
                oVar.E150        = Convert.ToInt32(dr["E150"]);
                oVar.E160        = Convert.ToInt32(dr["E160"]);
                oVar.E170        = Convert.ToInt32(dr["E170"]);
                oVar.E180        = Convert.ToInt32(dr["E180"]);
                oVar.E190        = Convert.ToInt32(dr["E190"]);
                oVar.E281        = Convert.ToInt32(dr["E281"]);
                oVar.E282        = Convert.ToInt32(dr["E282"]);
                oVar.E283        = Convert.ToInt32(dr["E283"]);
                oVar.E284        = Convert.ToInt32(dr["E284"]);
                oVar.E290        = Convert.ToInt32(dr["E290"]);
                oVar.E310        = Convert.ToInt32(dr["E310"]);
                oVar.E320        = Convert.ToInt32(dr["E320"]);
                oVar.E330        = Convert.ToInt32(dr["E330"]);
                oVar.E340        = Convert.ToInt32(dr["E340"]);
                oVar.E350        = Convert.ToInt32(dr["E350"]);
                oVar.E541        = Convert.ToInt32(dr["E541"]);
                oVar.E542        = Convert.ToInt32(dr["E542"]);
                oVar.E543        = Convert.ToInt32(dr["E543"]);
                oVar.E561        = Convert.ToInt32(dr["E561"]);
                oVar.E562        = Convert.ToInt32(dr["E562"]);
                oVar.E580        = Convert.ToInt32(dr["E580"]);
                oVar.E591        = Convert.ToInt32(dr["E591"]);
                oVar.E592        = Convert.ToInt32(dr["E592"]);
                oVar.E593        = Convert.ToInt32(dr["E593"]);
                oVar.E594        = Convert.ToInt32(dr["E594"]);
                oVar.E595        = Convert.ToInt32(dr["E595"]);
                oVar.Remarks     = dr["Remarks"].ToString();
                tmpStr           = GetDataString();
            }

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

            return(tmpStr);
        }