• 物料编号名成


     private void txtwlbh_KeyPress(object sender, KeyPressEventArgs e)
            {
                if (e.KeyChar == (char)Keys.Enter)
                {
                    if (this.txtwlbh.EditValue != null && this.txtwlbh.EditValue.ToString().Length > 3)
                    {
                        try
                        {
                            var bck = _commonClient.findWlxxList(new WlxxView() { wlbh = txtwlbh.Text });
                            if (bck.flag)
                            {
                                if (bck.obj.Count > 0)
                                {
                                    var dt = new List<CodeName>();
                                    bck.obj.ForEach(a => dt.Add(new CodeName() { code = a.wlxxid, name = a.wlbh }));
                                    new FrmFastSearch(this.txtwlxxid, this.txtwlbh, dt).ShowDialog();
                                    //txtwlxxid.EditValue = bck.obj[0].wlxxid;
                                }
                                
                            }
                            else
                            {
                                MyMsg.ShowError(bck.message);
                            }
                        }
                        catch (Exception ex)
                        {

                            MyMsg.Warning(ex.Message);
                        }
                    }
                }
            }

            private void txtmc_KeyPress(object sender, KeyPressEventArgs e)
            {
                if (e.KeyChar == (char)Keys.Enter)
                {
                    if (this.txtmc.EditValue != null && this.txtmc.EditValue.ToString().Length > 3)
                    {
                        try
                        {
                            var bck = _commonClient.findWlxxList(new WlxxView() { wlmc = txtmc.Text });
                            if (bck.flag)
                            {
                                if (bck.obj.Count > 0)
                                {
                                    var dt = new List<CodeName>();
                                    //dt.Add(new CodeName() { code = "", name = "" });
                                    bck.obj.ForEach(a => { dt.Add(new CodeName() { code = a.wlxxid, name = a.wlmc }); });
                                    new FrmFastSearch(this.txtwlxxid,this.txtmc, dt).ShowDialog();
                                }
                                
                            }
                            else
                            {
                                MyMsg.ShowError(bck.message);
                            }
                        }
                        catch (Exception ex)
                        {

                            MyMsg.Warning(ex.Message);
                        }
                    }
                }

            }

            private void txtwlxxid_EditValueChanged(object sender, EventArgs e)
            {
                try
                {
                    if (txtwlxxid.EditValue!=null)
                    {
                        if (txtwlxxid.EditValue.ToString().Length > 4)
                        {

                            var bck = _commonClient.findWlxxList(new WlxxView()
                            {
                                wlxxid = txtwlxxid.EditValue.ToString()
                            });

                            if (bck.flag)
                            {
                                if (bck.obj.Count > 0)
                                {
                                    txtwlbh.EditValue = bck.obj[0].wlbh;
                                    txtmc.EditValue = bck.obj[0].wlmc;
                                }
                                

                            }
                            else
                            {
                                MyMsg.ShowError(bck.message);

                                return;
                            }

                        }
                    }

                }
                catch (Exception ex)
                {

                    MyMsg.ShowError(ex.Message);

                    return;
                }
            }

  • 相关阅读:
    Mybatis之批量更新操作
    Spring Quartz *.QRTZ_LOCKS' doesn't exist
    分析NTFS文件系统得到特定文件的内容
    设计模式笔记——设计模式原则总结
    android自己定义ViewPager之——3D效果应用
    Android混淆代码
    百度地图 Android SDK
    NYOJ17,单调递增最长子序列
    令人纠结的两行代码
    XCode中在提示窗体中对已弃用的API接口画上红线
  • 原文地址:https://www.cnblogs.com/shalldou/p/11466286.html
Copyright © 2020-2023  润新知