private static int SendEmail() { Guid Sender = Guid.Parse("49A84FC4-0718-4C17-89F9-E7CCA762B1F2"); // ("004b37c1-70b8-4071-98ab-0bb73c466d00"); Guid Receiver = Guid.Parse("31A9DE51-C207-4A73-919C-21521F17FEF9"); SendMail _SendMail = new SendMail(); string conn = "Server=.;Database=AFRP;Persist Security Info=True;User ID=UniCloud;Password=fleet@XMZZ"; TestData td = new TestData(conn); Guid gd = td.GetLastAircraftPlan(); EncodeModel _EModel = new EncodeModel(conn); var obj = _EModel.EncodePlan(gd); if (obj != null) { return _SendMail.SendEntity(conn, Sender, Receiver, obj, "Plan", "Plan"); } else return -1; }
private void TestSaveOwnershipHistory() { string conn = "Server=.;Database=AFRP;Persist Security Info=True;User ID=UniCloud;Password=uni!cloud"; TestData td = new TestData(conn); Guid gd = td.GetLastOwnershipHistory(); EncodeModel _EModel = new EncodeModel(conn); var obj = _EModel.EncodeOwnershipHistory(gd); List<ReceiverObject> objList = new List<ReceiverObject>(); ReceiverObject ro = new ReceiverObject(); ro.Objects.Add(obj); objList.Add(ro); DecodeModel _Model = new DecodeModel(); if (_Model.SaveObjects(objList)) { if (_Model.DataChanged) { // UpdateXmlConfigFlag(); } } }