コード例 #1
0
ファイル: CompSubTypeRepo.cs プロジェクト: rledyard/ElecLib
        // ----------------------------------------------------------------------------------------
        public static void UpdateCompSubType(CompSubType cst)
        {
            // the incoming cst is the updated record
            PetaPoco.Database db = new PetaPoco.Database("ElecLibConnString");
            //SaveHistoryRecord(cst.CompSubTypeID, "UPDATED");

            // now update the record with the new data
            // touch the update person and time
            cst.EntryDate = DateTime.Now;
            cst.EnteredBy = "ElecLibUser";
            db.Update(cst);
        }
コード例 #2
0
ファイル: CompSubTypeRepo.cs プロジェクト: rledyard/ElecLib
 // ----------------------------------------------------------------------------------------
 public static CompSubType InsertCompSubType(CompSubType cst)
 {
     // add the user and timestamp
     cst.EnteredBy = "ElecLibUser";
     cst.EntryDate = DateTime.Now;
     PetaPoco.Database db = new PetaPoco.Database("ElecLibConnString");
     int newID = Convert.ToInt32(db.Insert(cst));
     cst.CompSubTypeID = newID;
     return cst;
 }