Пример #1
0
        protected override void AfterAdd(DataRow row)
        {
            SST.SSTReqRecipientRow dr = (SST.SSTReqRecipientRow)row;
            string ObjectName         = this.mySSTReqRecipientDT.TableName;

            dr.SSTReqRecId = myA.AtMng.PKIDGet(ObjectName, 10);
            dr.FileId      = dr.SSTRequestRow.FileId;
        }
Пример #2
0
        private void AddRecip()
        {
            int            id = 0;
            fContactSelect f  = new fContactSelect(FM, null, true, true, true);

            if (f.ShowDialog() == DialogResult.OK)
            {
                id = f.ContactId;
                SST.SSTReqRecipientRow rrr = (SST.SSTReqRecipientRow)SSTM.GetSSTReqRecipient().Add(CurrentRow());

                rrr.SentToContactId = id;

                FM.SaveAll();
            }
        }
Пример #3
0
        protected override void AfterChange(DataColumn dc, DataRow row)
        {
            SST.SSTRequestRow dr = (SST.SSTRequestRow)row;

            switch (dc.ColumnName)
            {
            case "DueDate":
                myA.FM.GetActivityBF().MaintainBFDate(dr.SSTReqId, myDT.TableName, dc.ColumnName, dr.DueDate);
                break;

            case "RefreshRecips":
                if (dr.RefreshRecips)
                {
                    foreach (SST.SSTReqRecipientRow rrr in dr.GetSSTReqRecipientRows())
                    {
                        rrr.Delete();
                    }
                    foreach (SST.FilePartyRow fpr in myA.DB.FileParty)
                    {
                        if (fpr.SendTo)
                        {
                            SST.SSTReqRecipientRow    reqrow = (SST.SSTReqRecipientRow)myA.GetSSTReqRecipient().Add(dr);
                            atriumDB.FileContactRow[] fcr    = (atriumDB.FileContactRow[])myA.FM.DB.FileContact.Select("FileContactid=" + fpr.FileContactId, "");
                            if (fcr.Length == 1)
                            {
                                reqrow.SentToContactId = fcr[0].ContactId;
                            }
                            else
                            {
                                throw new Exception("Could not set ContactID for Party: " + fpr.DisplayName);
                            }
                        }
                    }
                }
                break;
            }
        }