Ejemplo n.º 1
0
        private void tbGoodsname_Leave(object sender, EventArgs e)
        {
            tb_GoodsInfo        goods;
            tb_GoodsInfoMethods goodsmethod = new tb_GoodsInfoMethods();

            if (tbGoodsname.Text != "")
            {
                goods            = goodsmethod.Find(tbGoodsname.Text.Trim());
                tbGoodsname.Text = goods.strGoodsName;
                tbgoodsid.Text   = goods.strGoodsId;
                tbModel.Text     = goods.strModelNO;
                tbitemid.Text    = goods.strItemNO;
                //tbMaterial.Text = goods.strGoodMaterial;
                pictureBox1.ImageLocation = goods.strFImagePath;
            }
            else
            {
                tbgoodsid.Text = "";
                tbModel.Text   = "";
                tbitemid.Text  = "";
                //tbMaterial.Text = "";
                pictureBox1.Image = null;

                /*tbhgsl.Value = 0;
                 * tbpssl.Value = 0;
                 * tbklsl.Value = 0;
                 * tbghsl.Value = 0;
                 */
            }
        }
Ejemplo n.º 2
0
        private void BindControls()
        {
            if (FH != null)
            {
                tbserialnum.Text = FH.strFSerialNum;
                tbGoodsname.Text = FH.strFGoodsName;
                tbgoodsid.Text   = FH.strFGoodsID;
                dFdate.Value     = FH.dFDate;
                good             = goodmethod.Find(FH.strFGoodsName);
                tbModel.Text     = FH.strFModelno;
                tbitemid.Text    = FH.strFItemID;
                tbMaterial.Text  = FH.strFMaterial;

                // if (FH.imFimage != null)
                //  {
                //      MemoryStream buf = new MemoryStream((byte[])FH.imFimage);
                //      Image image = Image.FromStream(buf, true);
                //      pictureBox1.Image = image;
                //  }

                tbOperator.Text = FH.strFOperator;
                //tbCarno.Text = FH.strFCarNO;
                tbhgsl.Value = FH.dFHGSL;
                //tbpssl.Value = FH.dFPSSL;
                //tbghsl.Value = FH.dFKHSL;
                //tbklsl.Value = FH.dFKLSL;
            }
        }
Ejemplo n.º 3
0
        private void BindControls()
        {
            if (JCH != null)
            {
                tbserialnum.Text = JCH.strJCSerialNum;
                tbGoodsname.Text = JCH.strJCGoodsName;
                tbgoodsid.Text   = JCH.strJCGoodsID;
                djcdate.Value    = JCH.dJCDate;
                good             = goodmethod.Find(JCH.strJCGoodsName);
                tbModel.Text     = JCH.strJCModelno;
                tbitemid.Text    = JCH.strJCItemID;
                tbMaterial.Text  = JCH.strJCMaterial;

                if (JCH.imJCimage != null)
                {
                    MemoryStream buf   = new MemoryStream((byte[])JCH.imJCimage);
                    Image        image = Image.FromStream(buf, true);
                    pictureBox1.Image = image;
                }

                tbOperator.Text = JCH.strJCOperator;
                tbCarno.Text    = JCH.strJCCarNO;
                tbhgsl.Value    = JCH.dJCHGSL;
                tbpssl.Value    = JCH.dJCPSSL;
                tbghsl.Value    = JCH.dJCKHSL;
                tbklsl.Value    = JCH.dJCKLSL;
            }
        }
Ejemplo n.º 4
0
        private void BindControls()
        {
            if (JCH != null)
            {
                tbserialnum.Text = JCH.strJCSerialNum;
                tbGoodsname.Text = JCH.strJCGoodsName;
                tbgoodsid.Text   = JCH.strJCGoodsID;
                djcdate.Value    = JCH.dJCDate;
                good             = goodmethod.Find(JCH.strJCGoodsName);
                tbModel.Text     = JCH.strJCModelno;
                tbitemid.Text    = JCH.strJCItemID;
                tbMaterial.Text  = JCH.strJCMaterial;

                tbOperator.Text = JCH.strJCOperator;
                tbCarno.Text    = JCH.strJCCarNO;
                tbhgsl.Value    = JCH.dJCHGSL;
            }
        }
Ejemplo n.º 5
0
        private void tbGoodsname_TextChanged(object sender, EventArgs e)
        {
            if (tbGoodsname.Text.Trim() != "" && tbCarno.Text.Trim() != "" && cmbkilnno.Text.Trim() != "")
            {
                try
                {
                    //tbGoodsname.Items.Clear();
                    string sql = "select JCGoodsID,JCItemID,JCModelno,JCHGSL,id,JCGoodsName,JCCarNO from tb_jch a" +
                                 " where jcgoodsname = '" + tbGoodsname.Text.Trim() + "' and jccarno = '" + tbCarno.Text.Trim() + "'and FKilnNO = '" + cmbkilnno.SelectedValue.ToString().Trim() + "' and jctype = 0 " +
                                 " and not exists (select 1 from tb_jch where a.id = FZYID )";
                    DataSet ds = dbl.GetDataset(sql);
                    if (ds != null)
                    {
                        if (ds.Tables.Count > 0)
                        {
                            if (ds.Tables[0].Rows.Count > 0)
                            {
                                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                                {
                                    //tbGoodsname.Items.Add(ds.Tables[0].Rows[i][1].ToString());
                                    tbgoodsid.Text = ds.Tables[0].Rows[i][0].ToString();
                                    tbitemid.Text  = ds.Tables[0].Rows[i][1].ToString();
                                    tbModel.Text   = ds.Tables[0].Rows[i][2].ToString();
                                    tbryhgsl.Value = Convert.ToInt16(ds.Tables[0].Rows[i][3]);
                                    tbhgsl.Value   = tbryhgsl.Value;
                                    fzyid          = Convert.ToInt32(ds.Tables[0].Rows[i][4]);
                                }
                            }
                        }
                    }
                    else
                    {
                        tb_GoodsInfo        tbgood       = new tb_GoodsInfo();
                        tb_GoodsInfoMethods tbgoodmethod = new tb_GoodsInfoMethods();
                        tbgood = tbgoodmethod.Find(tbGoodsname.Text.Trim());
                        if (tbgood != null)
                        {
                            tbgoodsid.Text = tbgood.strGoodsId;
                            tbitemid.Text  = tbgood.strItemNO;
                            tbModel.Text   = tbgood.strModelNO;
                            tbryhgsl.Value = 0;
                        }
                        else
                        {
                            tbgoodsid.Text = "";
                            tbitemid.Text  = "";
                            tbModel.Text   = "";
                            tbryhgsl.Value = 0;
                        }
                        fzyid        = 0;
                        tbhgsl.Value = 0;
                        tbpssl.Value = 0;
                        tbghsl.Value = 0;
                        tbklsl.Value = 0;
                        tbhgl.Value  = 0;
                    }
                }
                catch (Exception)
                {
                    throw;
                }
            }
            tb_GoodsInfo        goods;
            tb_GoodsInfoMethods goodsmethod = new tb_GoodsInfoMethods();

            if (tbGoodsname.Text != "")
            {
                goods = goodsmethod.Find(tbGoodsname.Text.Trim());
                //tbGoodsname.Text = goods.strGoodsName;
                //tbgoodsid.Text = goods.strGoodsId;
                //tbModel.Text = goods.strModelNO;
                //tbitemid.Text = goods.strItemNO;
                // tbMaterial.Text = goods.strGoodMaterial;
                if (goods.strFImagePath != null)
                {
                    pictureBox1.ImageLocation = goods.strFImagePath;
                }
            }
            else
            {
                tbgoodsid.Text            = "";
                tbModel.Text              = "";
                tbitemid.Text             = "";
                tbMaterial.Text           = "";
                pictureBox1.ImageLocation = null;
                tbhgsl.Value              = 0;
                tbpssl.Value              = 0;
                tbklsl.Value              = 0;
                tbghsl.Value              = 0;
            }
        }