コード例 #1
0
 public void Resolve(officeDB.OfficerRow or, docDB.RecipientRow newR)
 {
     if (!or.IsEmailAddressNull())
     {
         newR.Address = or.EmailAddress;  //addresstype will default to SMTP so that shouldbe the primary email type for all users
     }
     newR.OfficeId  = or.OfficeId;
     newR.OfficerId = or.OfficerId;
     newR.Name      = or.LastName + ", " + or.FirstName + " (" + or.OfficerCode + ")";
 }
コード例 #2
0
        protected override void BeforeChange(DataColumn dc, DataRow ddr)
        {
            base.BeforeChange(dc, ddr);
            string ObjectName = this.myOfficerDT.TableName;

            officeDB.OfficerRow dr = (officeDB.OfficerRow)ddr;
            switch (dc.ColumnName)
            {
            case "OfficerCode":
                if (dr.IsUserNameNull())
                {
                    dr.UserName = dr.OfficerCode;
                }
                break;

            case "PositionCode":
                if (!myA.CheckDomain(dr.PositionCode, myA.AtMng.GetFile().Codes("PositionCode")))
                {
                    throw new AtriumException(atriumBE.Properties.Resources.BadDomainValue, dc.ColumnName, dr.Table.TableName, "Position Code");
                }
                if (dr.PositionCode == "LA" && dr.IsAssistantIdNull())
                {
                    throw new RequiredException("Assistant");
                }
                break;

            case "EmailAddress":
                if (dr.IsEmailAddressNull())
                {
                    throw new RequiredException(dc.ColumnName);
                }
                break;

            default:
                break;
            }
        }