Esempio n. 1
0
 private void txtParentCode_Leave(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(this.txtParentCode.Text.Trim()))
     {
         BaseProductGroupTable ProductGroup  = new BaseProductGroupTable();
         BProductGroup         bProductGroup = new BProductGroup();
         ProductGroup = bProductGroup.GetModel(this.txtParentCode.Text);
         if (ProductGroup == null || "".Equals(ProductGroup))
         {
             txtParentCode.Focus();
             txtParentCode.Text = "";
             txtParentName.Text = "";
             MessageBox.Show("上级商品类别不存在,请重新输入!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
         else
         {
             txtParentCode.Text = ProductGroup.CODE;
             txtParentName.Text = ProductGroup.NAME;
             txtIndicatesOrder.Focus();
         }
     }
     else
     {
         txtParentName.Text = "";
     }
 }
Esempio n. 2
0
 private void txtProduct_Group_Code_Leave(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(this.txtProduct_Group_Code.Text.Trim()))
     {
         BaseProductGroupTable product  = new BaseProductGroupTable();
         BProductGroup         bProduct = new BProductGroup();
         product = bProduct.GetModel(this.txtProduct_Group_Code.Text);
         if (product == null || "".Equals(product))
         {
             txtProduct_Group_Code.Focus();
             txtProduct_Group_Code.Text = "";
             txtProduct_Group_Name.Text = "";
             MessageBox.Show("商品种类不存在!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
         else
         {
             txtProduct_Group_Code.Text = product.CODE;
             txtProduct_Group_Name.Text = product.NAME;
         }
     }
     else
     {
         txtProduct_Group_Name.Text = "";
     }
 }
Esempio n. 3
0
 private void txtCode_Leave(object sender, EventArgs e)
 {
     //判断编号是否已存在
     if (!string.IsNullOrEmpty(this.txtCode.Text.Trim()))
     {
         BaseProductGroupTable ProductGroupCode = new BaseProductGroupTable();
         ProductGroupCode = bProductGroup.GetModel(txtCode.Text);
         if (ProductGroupCode != null)
         {
             txtCode.Focus();
             txtCode.Text = "";
             MessageBox.Show("编号已存在。", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
     }
 }
Esempio n. 4
0
        /// <summary>
        /// 获得当前选中的数据
        /// </summary>
        private void GetCurrentSelectedTable()
        {
            try
            {
                string code = dgvData.SelectedRows[0].Cells["CODE"].Value.ToString();
                if (code != "")
                {
                    _currentProductGroupTable = bProductGroup.GetModel(code);
                }
            }
            catch (Exception ex) { }

            if (_currentProductGroupTable == null || _currentProductGroupTable.CODE == null || "".Equals(_currentProductGroupTable.CODE))
            {
                _currentProductGroupTable = null;
            }
        }
Esempio n. 5
0
 private void txtGroupCode_Leave(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(this.txtGroupCode.Text.Trim()))
     {
         BaseProductGroupTable productGroup  = new BaseProductGroupTable();
         BProductGroup         bProductGroup = new BProductGroup();
         productGroup = bProductGroup.GetModel(this.txtGroupCode.Text);
         if (productGroup == null || "".Equals(productGroup))
         {
             txtGroupCode.Focus();
             txtGroupCode.Text = "";
             txtGroupName.Text = "";
             MessageBox.Show("类别型号不存在,请重新输入!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
         else
         {
             txtGroupName.Text = productGroup.NAME;
         }
     }
 }
Esempio n. 6
0
 private void txtGroupCode_Leave(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(this.txtGroupCode.Text.Trim()))
     {
         BaseProductGroupTable productGroup = bProductGroup.GetModel(this.txtGroupCode.Text);
         if (productGroup != null)
         {
             txtGroupName.Text = productGroup.NAME;
         }
         else
         {
             txtGroupCode.Text = "";
             txtGroupName.Text = "";
             MessageBox.Show("种类不存在。", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
             txtGroupCode.Focus();
         }
     }
     else
     {
         txtGroupCode.Text = "";
         txtGroupName.Text = "";
     }
 }