Ejemplo n.º 1
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            try
            {
                 string QueryStr=string.Empty;//查询条件
                 QueryStr += txtBusinUnitCode.Caption.Trim().ToString();
                 QueryStr += txtBusinUnitName.Caption.Trim().ToString();
                 QueryStr += txtContact.Caption.Trim().ToString();
                 QueryStr += txtTelephone.Caption.Trim().ToString();
                 //显示查询进度
                 QueryProgressFrm ProgFrm = new QueryProgressFrm();
                 ProgFrm.ShowDialog();
                 BindSupData();//获取供应商信息
                 BindCustData();//获取客户信息
                 if (string.IsNullOrEmpty(QueryStr))
                 {              
                     //获取所有客户和供应商信息
                     GetSupMsg();
                     GetCustMsg();
                 }
                else
                 {
                     if (CustCounts == 0 && SuppCounts != 0)
                    {
                        GetSupMsg();//获取供应商信息
                    }
                     else if (SuppCounts == 0 && CustCounts != 0)
                     {
                         GetCustMsg();//获取客户信息
                     }
                     else
                     {
                         //获取所有客户和供应商信息
                         GetSupMsg();
                         GetCustMsg();
                     }
                 }

            }
            catch (Exception ex)
            {
                MessageBoxEx.Show(ex.Message, "异常提示", MessageBoxButtons.OK, MessageBoxIcon.Question);

            }

        }
Ejemplo n.º 2
0
 /// <summary>
 /// 配件库存查询
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSearch_Click(object sender, EventArgs e)
 {
     if (gvStockList.Rows.Count != 0) gvStockList.Rows.Clear();//清空原始数据
     string QueryWhere = QueryPartWhereCondition();//获取查询条件
     //显示查询进度
     QueryProgressFrm ProgFrm = new QueryProgressFrm();
     ProgFrm.ShowDialog();
     if (CheckBGuarantyStock.Checked)
     {
         GetYuTongPartList(QueryWhere);//宇通三包库存查询
     }
     else
     {
         GetPartList(QueryWhere);//配件库存查询
     }
 }