Exemple #1
0
        private void gridViewRowChanged1(object sender)
        {
            BaseFocusLabel.Focus();
            ColumnView view = sender as ColumnView;

            ProcessGrid.SetFormValue(this, view);
            string GBCode = SysConvert.ToString(view.GetRowCellValue(view.FocusedRowHandle, view.Columns["GBCode"]));

            byte[] pic = GetPic(GBCode);
            if (pic != null)
            {
                img1.Image = TemplatePic.ByteToImage(pic);
            }
            else
            {
                img1.Image = null;
            }
            GetItemLabel(GBCode);

            string sql = "SELECT JCTime,VendorAttn FROM UV1_Dev_GBJCLRDts WHERE GBCode=" + SysString.ToDBString(GBCode);

            sql += " ORDER BY JCTime DESC";
            DataTable dt = SysUtils.Fill(sql);

            gridView2.GridControl.DataSource = dt;
            gridView2.GridControl.Show();
        }
Exemple #2
0
        private void gridViewRowChanged2(object sender)
        {
            try
            {
                BaseFocusLabel.Focus();
                ColumnView view = sender as ColumnView;
                if (view.FocusedRowHandle >= 0)
                {
                    int ID = SysConvert.ToInt32(view.GetRowCellValue(view.FocusedRowHandle, "DtsID"));

                    ItemGB entityGB = new ItemGB();
                    entityGB.ID = ID;
                    entityGB.SelectByID();

                    List <Image> lstimage = new List <Image>();
                    if (entityGB.GBPic.Length > 10)
                    {
                        lstimage.Add(TemplatePic.ByteToImage(entityGB.GBPic));
                    }
                    ucPictureView1.UCDataLstImage = lstimage;
                }
                else
                {
                    List <Image> lstimage = new List <Image>();
                    ucPictureView1.UCDataLstImage = lstimage;
                }
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }
        private void BindPic()
        {
            ItemPic entity = new ItemPic();

            entity.MainID = HTDataID;
            entity.Seq    = 1;
            entity.SelectByID();
            if (entity.PicImage != null)
            {
                pictureBox1.Image = TemplatePic.ByteToImage(entity.PicImage);
            }
            else
            {
                pictureBox1.Image = null;
            }
        }
Exemple #4
0
        /// <summary>
        /// 重新设置实体1
        /// </summary>
        private void gridViewRowChanged1(object sender)
        {
            ColumnView view     = sender as ColumnView;
            string     itemCode = SysConvert.ToString(view.GetRowCellValue(view.FocusedRowHandle, view.Columns["ItemCode"]));

            //SetStorgeQty(itemCode);//显示库存信息


            if (SysConvert.ToString(view.GetRowCellValue(view.FocusedRowHandle, "ISN")) != "")//显示图片
            {
                if (GetPicByCode(SysConvert.ToString(view.GetRowCellValue(view.FocusedRowHandle, "ISN"))) != null)
                {
                    picSample.Image = TemplatePic.ByteToImage(GetPicByCode(SysConvert.ToString(view.GetRowCellValue(view.FocusedRowHandle, "ISN"))));
                }
            }
        }
        private void BindPic()
        {
            string sql = "SELECT * FROM Data_VendorFile WHERE MainID=" + SysString.ToDBString(HTDataID);

            sql += " ORDER BY Seq";
            DataTable dt = SysUtils.Fill(sql);

            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    if (SysConvert.ToInt32(dt.Rows[i]["FileTypeID"]) == i + 1)
                    {
                        switch (i + 1)
                        {
                        case 1:
                            img1.Image      = TemplatePic.ByteToImage((byte[])dt.Rows[i]["Context"]);
                            txtRemark1.Text = SysConvert.ToString(dt.Rows[i]["Remark"]);
                            break;

                        case 2:
                            img2.Image      = TemplatePic.ByteToImage((byte[])dt.Rows[i]["Context"]);
                            txtRemark2.Text = SysConvert.ToString(dt.Rows[i]["Remark"]);
                            break;

                        case 3:
                            img3.Image      = TemplatePic.ByteToImage((byte[])dt.Rows[i]["Context"]);
                            txtRemark3.Text = SysConvert.ToString(dt.Rows[i]["Remark"]);
                            break;

                        case 4:
                            img4.Image      = TemplatePic.ByteToImage((byte[])dt.Rows[i]["Context"]);
                            txtRemark4.Text = SysConvert.ToString(dt.Rows[i]["Remark"]);
                            break;

                        case 5:
                            img5.Image      = TemplatePic.ByteToImage((byte[])dt.Rows[i]["Context"]);
                            txtRemark5.Text = SysConvert.ToString(dt.Rows[i]["Remark"]);
                            break;

                        default:
                            break;
                        }
                    }
                }
            }
        }
Exemple #6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        private void gridViewRowChanged1(object sender)
        {
            BaseFocusLabel.Focus();
            ColumnView view = sender as ColumnView;

            ProcessGrid.SetFormValue(this, view);
            int    MainID = SysConvert.ToInt32(view.GetRowCellValue(view.FocusedRowHandle, view.Columns["MainID"]));
            string GBCode = SysConvert.ToString(view.GetRowCellValue(view.FocusedRowHandle, view.Columns["GBCode"]));

            byte[] pic = GetPic(GBCode);
            if (pic != null)
            {
                img1.Image = TemplatePic.ByteToImage(pic);
            }
            else
            {
                img1.Image = null;
            }
            BindGrid2(MainID);
            GetItemLabel(GBCode);
        }
Exemple #7
0
        private void EntitySet()
        {
            if (m_DID == 0)
            {
                Item entity = new Item();
                entity.ID = m_ID;
                entity.SelectByID();
                drpGBDate.DateTime      = DateTime.Now.Date;
                txtGBItemName.Text      = entity.ItemName;
                txtGMWeight.Text        = entity.MWeight.ToString();
                txtGMWidth.Text         = entity.MWidth.ToString();
                drpGBStatusID.EditValue = (int)EnumGBStatus.在库;
                txtGBCode_DoubleClick(null, null);
            }
            else
            {
                ItemGB entityGB = new ItemGB();
                entityGB.ID = m_DID;
                entityGB.SelectByID();
                drpGBDate.DateTime = entityGB.GBDate;

                List <Image> lstimage = new List <Image>();
                if (entityGB.GBPic.Length > 10)
                {
                    lstimage.Add(TemplatePic.ByteToImage(entityGB.GBPic));
                    ucPictureInput1.UCDataLstImage = lstimage;
                }
                txtGBCode.Text          = entityGB.GBCode;
                txtColorNum.Text        = entityGB.ColorNum;
                txtColorName.Text       = entityGB.ColorName;
                txtDRemark.Text         = entityGB.Remark;
                txtGBItemName.Text      = entityGB.ItemName;
                txtGMWeight.Text        = entityGB.MWeight.ToString();
                txtGMWidth.Text         = entityGB.MWidth.ToString();
                drpGBStatusID.EditValue = entityGB.GBStatusID;
            }

            Common.BindGBColorNum(txtColorNum, m_ID, true);
            Common.BindGBColorName(txtColorName, m_ID, true);
        }
Exemple #8
0
        void BindImage()
        {
            string    sql = "SELECT GBPic FROM Data_ItemGB WHERE ID=" + SysString.ToDBString(m_GBID);
            DataTable dt  = SysUtils.Fill(sql);

            if (dt.Rows.Count > 0)
            {
                List <Image> lstimage = new List <Image>();
                byte[]       picdata  = (byte[])dt.Rows[0][0];
                if (picdata.Length > 10)
                {
                    lstimage.Add(TemplatePic.ByteToImage(picdata));
                }
                ucPictureView1.UCDataLstImage = lstimage;
            }
            else
            {
                List <Image> lstimage = new List <Image>();
                ucPictureView1.UCDataLstImage = lstimage;
            }
            this.Text = "图片查看";//[" + GBCode + "]";
        }