示例#1
0
 public void Copy(COBudgetPCNExpense oNew)
 {
     oNew.ID          = miID;
     oNew.PCNID       = miPCNID;
     oNew.Code        = msCode;
     oNew.Description = msDescription;
     oNew.DlrsPerItem = mdDlrsPerItem;
     oNew.NumItems    = miNumItems;
     oNew.MUPerc      = mdMUPerc;
     oNew.MarkUp      = mdMarkUp;
     oNew.TotalCost   = mdTotalCost;
     oNew.DeptGroup   = miDeptGroup;
 }
示例#2
0
 public void LoadFromObj(COBudgetPCNExpense oOrg)
 {
     miID          = oOrg.ID;
     miPCNID       = oOrg.PCNID;
     msCode        = oOrg.Code;
     msDescription = oOrg.Description;
     mdDlrsPerItem = oOrg.DlrsPerItem;
     miNumItems    = oOrg.NumItems;
     mdMUPerc      = oOrg.MUPerc;
     mdMarkUp      = oOrg.MarkUp;
     mdTotalCost   = oOrg.TotalCost;
     miDeptGroup   = oOrg.DeptGroup;
 }
示例#3
0
        private void LoadVals(string strXml)
        {
            XmlSerializer s;
            StringReader  sr;

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

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

            sr.Close();
            sr = null;
            s  = null;
        }
示例#4
0
        public string GetByID(int lID)
        {
            SqlDataReader dr;

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

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

                oVar.ID          = Convert.ToInt32(dr["ID"]);
                oVar.PCNID       = Convert.ToInt32(dr["PCNID"]);
                oVar.Code        = dr["Code"].ToString();
                oVar.Description = dr["Description"].ToString();
                oVar.DlrsPerItem = Convert.ToDecimal(dr["DlrsPerItem"]);
                oVar.NumItems    = Convert.ToInt32(dr["NumItems"]);
                oVar.MUPerc      = Convert.ToDecimal(dr["MUPerc"]);
                oVar.MarkUp      = Convert.ToDecimal(dr["MarkUp"]);
                oVar.TotalCost   = Convert.ToDecimal(dr["TotalCost"]);
                oVar.DeptGroup   = Convert.ToInt32(dr["DeptGroup"]);
                tmpStr           = GetDataString();
            }

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

            return(tmpStr);
        }
示例#5
0
        public void LoadVals(string strXml)
        {
            XmlSerializer      s;
            StringReader       sr;
            COBudgetPCNExpense o;

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

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

            base.LoadFromObj(o);

            o = null;
            sr.Close();
            sr = null;
            s  = null;
        }
示例#6
0
        public string GetDataString()
        {
            string             tmpStr;
            COBudgetPCNExpense o;
            XmlSerializer      s;
            StringWriter       sw;

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

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

            tmpStr = sw.ToString();

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

            return(tmpStr);
        }