//往来单位 private void txtcDepartment_ChooserClick(object sender, EventArgs e) { frmBtype frmbtype = new frmBtype(); if (frmbtype.ShowDialog() == DialogResult.OK) { txtcDepartment.Text = frmbtype.BtypeName; } }
//往来单位1选择器 private void txtcCustName1_ChooserClick(object sender, EventArgs e) { //if (CommonCtrl.IsNullToString(cboOrderType.SelectedValue) == "") //{ // return; //} frmBtype frmUints = new frmBtype(); if (frmUints.ShowDialog() == DialogResult.OK) { txtcCustName1.Text = frmUints.BtypeName; } return; DataSources.EnumAccountVerification enumAccount = (DataSources.EnumAccountVerification)Convert.ToInt32(cboOrderType.SelectedValue); switch (enumAccount) { case DataSources.EnumAccountVerification.YuShouToYingShou: //预收冲应收 case DataSources.EnumAccountVerification.YingShouToYingShou: //应收转应收 case DataSources.EnumAccountVerification.YingShouToYingFu: //应收冲应付 case DataSources.EnumAccountVerification.YuShouToYuShou: //预收转预收 frmCustomerInfo frmCustomer = new frmCustomerInfo(); if (frmCustomer.ShowDialog() == DialogResult.OK) { txtcCustName1.Tag = frmCustomer.strCustomerId; txtcCustName1.Text = frmCustomer.strCustomerName; if (txtcCustName2.Tag == null && enumAccount != DataSources.EnumAccountVerification.YingShouToYingFu) //没有选择应收客户,默认选择与预收客户相同 { txtcCustName2.Tag = frmCustomer.strCustomerId; txtcCustName2.Text = frmCustomer.strCustomerName; } } break; case DataSources.EnumAccountVerification.YuFuToYingFu: //预付冲应付 case DataSources.EnumAccountVerification.YingFuToYingFu: //应付转应付 case DataSources.EnumAccountVerification.YingFuToYingShou: //应付冲应收 case DataSources.EnumAccountVerification.YuFuToYuFu: //预付转预付 frmSupplier frmSupp = new frmSupplier(); if (frmSupp.ShowDialog() == DialogResult.OK) { txtcCustName1.Tag = frmSupp.supperID; txtcCustName1.Text = frmSupp.supperName; if (txtcCustName2.Tag == null && enumAccount != DataSources.EnumAccountVerification.YingFuToYingShou) { txtcCustName2.Tag = frmSupp.supperID; txtcCustName2.Text = frmSupp.supperName; } } break; } }