示例#1
0
 private void txtSupplierCode_Leave(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(this.txtSupplierCode.Text.Trim()))
     {
         BaseSupplierTable SupplierCode = new BaseSupplierTable();
         BSupplier         bSupplier    = new BSupplier();
         SupplierCode = bSupplier.GetModel(txtSupplierCode.Text);
         if (SupplierCode == null)
         {
             txtSupplierCode.Focus();
             txtSupplierCode.Text = "";
             txtSupplierName.Text = "";
             MessageBox.Show("供应商编号不存在,请重新输入!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
         else
         {
             txtSupplierName.Text = SupplierCode.NAME;
         }
     }
     else
     {
         txtSupplierCode.Text = "";
         txtSupplierName.Text = "";
     }
 }
示例#2
0
文件: FrmBase.cs 项目: zhr008/ERP-1
        protected BaseSupplierTable GetSupplierCurrence(string CODE)
        {
            BaseSupplierTable supplierTable = new BaseSupplierTable();

            supplierTable = bSupplier.GetModel(CODE);
            return(supplierTable);
        }
示例#3
0
 private void txtCode_Leave(object sender, EventArgs e)
 {
     //判断编号是否已存在
     if (!string.IsNullOrEmpty(this.txtCode.Text.Trim()))
     {
         BaseSupplierTable SupplierCode = new BaseSupplierTable();
         SupplierCode = bSupplier.GetModel(txtCode.Text);
         if (SupplierCode != null)
         {
             txtCode.Focus();
             txtCode.Text = "";
             MessageBox.Show("供应商编号已存在,请重新输入!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
     }
     if (rClaim1.Checked)
     {
         txtClaimCode.Text = txtCode.Text;
     }
 }
示例#4
0
        /// <summary>
        /// 获得当前选中的数据
        /// </summary>
        private void GetCurrentSelectedTable()
        {
            try
            {
                string code = dgvData.SelectedRows[0].Cells["CODE"].Value.ToString();
                if (code != "")
                {
                    _currentSupplierTable = bSupplier.GetModel(code);
                }
            }
            catch (Exception ex) { }

            if (_currentSupplierTable == null || _currentSupplierTable.CODE == null || "".Equals(_currentSupplierTable.CODE))
            {
                _currentSupplierTable = null;
            }
        }