Example #1
0
 /// <summary>
 ///     初始化承运人相关信息。
 /// </summary>
 /// <returns></returns>
 public override void InitialData()
 {
     var forwarder = new Forwarder
     {
         Address = new Address(null, null, "四川成都", null),
         Attn = "陈春勇",
         Email = "*****@*****.**",
         CnName = "川航承运人",
         Fax = "1234567",
         Tel = "1234567",
     };
     Context.Forwarders.Add(forwarder);
 }
Example #2
0
        /// <summary>
        ///     设置承运人
        /// </summary>
        /// <param name="forwarder">承运人</param>
        public void SetForwarder(Forwarder forwarder)
        {
            if (forwarder == null || forwarder.IsTransient())
            {
                throw new ArgumentException("交易合同参数为空!");
            }

            Forwarder = forwarder;
            ForwarderId = forwarder.Id;
            ForwarderLinkman = forwarder.Attn;
        }