Esempio n. 1
0
 /// <summary>
 /// 选择发件人作为发件人来打印,网点不想总是切换默认发件人来打印,这种不好
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ckChooseSendMan_CheckedChanged(object sender, EventArgs e)
 {
     if (ckChooseSendMan.Checked)
     {
         FrmChooseSendMan chooseSendMan = new FrmChooseSendMan();
         if (chooseSendMan.ShowDialog() == DialogResult.OK)
         {
             if (!string.IsNullOrEmpty(chooseSendMan.sendManControl1.ChooseId))
             {
                 var           userManager = new ZtoUserManager(BillPrintHelper.DbHelper);
                 ZtoUserEntity userEntity  = userManager.GetObject(chooseSendMan.sendManControl1.ChooseId);
                 if (userEntity != null)
                 {
                     this.Tag  = userEntity;
                     this.Text = this.Text + string.Format(" 正在使用({0}-{1}-{2})作为发件人来进行导入", userEntity.Realname, userEntity.Mobile, userEntity.TelePhone);
                 }
             }
         }
         chooseSendMan.Dispose();
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 选择发件人
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ckChooseSendMan_CheckedChanged(object sender, System.EventArgs e)
 {
     if (ckChooseSendMan.Checked)
     {
         var chooseReceiveMan = new FrmChooseSendMan();
         if (chooseReceiveMan.ShowDialog() == DialogResult.OK)
         {
             if (!string.IsNullOrEmpty(chooseReceiveMan.sendManControl1.ChooseId))
             {
                 ZtoUserManager userManager = new ZtoUserManager(BillPrintHelper.DbHelper);
                 ZtoUserEntity  userEntity  = userManager.GetObject(chooseReceiveMan.sendManControl1.ChooseId);
                 if (userEntity != null)
                 {
                     this.Tag        = userEntity;
                     txtSendMan.Text = "发件人姓名为:" + userEntity.Realname + Environment.NewLine + "发件人电话为:" + userEntity.Mobile + userEntity.TelePhone + Environment.NewLine + "发件人地址为:" + userEntity.Address;
                 }
             }
         }
         chooseReceiveMan.Dispose();
     }
 }