コード例 #1
0
        public static void Insert(RedBloodDataContext db, Donation p, string propertyName, string note)
        {
            DonationTestLog e = new DonationTestLog();

            e.DIN  = p.DIN;
            e.Type = propertyName;

            PropertyInfo prop = p.GetType().GetProperty(propertyName);

            if (prop != null)
            {
                e.Result = prop.GetValue(p, null).ToString();
            }

            e.Date  = DateTime.Now;
            e.Actor = RedBloodSystem.CurrentActor;
            e.Note  = note;

            db.DonationTestLogs.InsertOnSubmit(e);
        }
コード例 #2
0
    public static void Insert(RedBloodDataContext db, Donation p, string propertyName, string note)
    {
        DonationTestLog e = new DonationTestLog();

        e.DIN = p.DIN;
        e.Type = propertyName;

        PropertyInfo prop = p.GetType().GetProperty(propertyName);

        if (prop != null)
        {
            e.Result = prop.GetValue(p, null).ToString();
        }

        e.Date = DateTime.Now;
        e.Actor = RedBloodSystem.CurrentActor;
        e.Note = note;

        db.DonationTestLogs.InsertOnSubmit(e);
    }