Profiles.Edit.Utilities.DataIO.UpdateAward C# (CSharp) Méthode

UpdateAward() public méthode

public UpdateAward ( string subjecturi, string label, string institution, string startdate, string enddate, XmlDocument PropertyListXML ) : bool
subjecturi string
label string
institution string
startdate string
enddate string
PropertyListXML XmlDocument
Résultat bool
        public bool UpdateAward(string subjecturi, string label, string institution,
            string startdate, string enddate, XmlDocument PropertyListXML)
        {
            long subjectid = this.GetStoreNode(subjecturi);
            ActivityLog(PropertyListXML, subjectid, label, institution);
            bool error = false;
            try
            {

                StoreAwardReceiptRequest sarr = new StoreAwardReceiptRequest();
                sarr.ExistingAwardReceiptURI = new StoreAwardReceiptParam();
                sarr.ExistingAwardReceiptURI.Value = subjecturi;
                sarr.ExistingAwardReceiptURI.ParamOrdinal = 0;

                sarr.Label = new StoreAwardReceiptParam();
                sarr.Label.Value = label;
                sarr.Label.ParamOrdinal = 1;

                sarr.AwardConferedBy = new StoreAwardReceiptParam();
                sarr.AwardConferedBy.Value = institution;
                sarr.AwardConferedBy.ParamOrdinal = 2;

                sarr.StartDate = new StoreAwardReceiptParam();
                sarr.StartDate.Value = startdate;
                sarr.StartDate.ParamOrdinal = 3;

                sarr.EndDate = new StoreAwardReceiptParam();
                sarr.EndDate.Value = enddate;
                sarr.EndDate.ParamOrdinal = 4;

                sarr.AwardOrHonorForID = new StoreAwardReceiptParam();
                sarr.AwardOrHonorForID.Value = subjectid.ToString();
                sarr.AwardOrHonorForID.ParamOrdinal = 5;
                error = this.StoreAwardReceipt(sarr);

            }
            catch (Exception e)
            {
                Framework.Utilities.DebugLogging.Log(e.Message + e.StackTrace);
                throw new Exception(e.Message);
            }

            return error;
        }