Exemple #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            if (tx概要.Text == string.Empty)
            {
                MessageBox.Show("请填写[概要]的相关信息 !", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                tx概要.Focus();
                return;
            }
            DateDef.图片 图片Info = new DateDef.图片(strPointCode);

            图片Info.B概要 = tx概要.Text;
            图片Info.B图片说明 = tx图片说明.Text;
            if (File.Exists(PicPath.Text))
            {
                图片Info.B图片 = FileToByte(PicPath.Text);
            }
            else
            {
                图片Info.B图片 = FileToByte(CurrPath + "\\Image\\no.JPG");
            }

            图片comend.UpDate图片(图片Info);

            SQLExecute.Operate = "用户" + DBUser.CURR_USERID + "更新图片,基站编号:" + strPointCode + ",图片的概要:" + tx概要.Text;
            SQLExecute.SaveOperate();

            MessageBox.Show("更新成功 !", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);

            InitDic();
        }
Exemple #2
0
        private void InitDic()
        {
            dic图片 = new Dictionary<string, DateDef.图片>();
            DateDef.图片 图片Info = null;
            DataTable  dt  = 图片comend.Get图片ByID(strPointCode);
            if (listBox1.Items.Count>0)
            {
                listBox1.Items.Clear();
            }

            if (dt.Rows.Count > 0)
            {

                foreach (DataRow dr in dt.Rows)
                {
                    图片Info = new DateDef.图片(dr["basedateID"].ToString());
                    图片Info.B图片说明 = dr["图片说明"].ToString();
                    图片Info.B概要 = dr["概要"].ToString();
                    图片Info.B图片 = (System.Byte[])dr["图片"];

                    dic图片.Add(图片Info.B概要, 图片Info);
                    listBox1.Items.Add(图片Info.B概要);
                }
            }
        }
Exemple #3
0
 private void tx概要_TextChanged(object sender, EventArgs e)
 {
     DateDef.图片 图片Info = new DateDef.图片(strPointCode);
        // tx概要.Text = 图片Info.B概要;
     tx图片说明.Text = 图片Info.B图片说明;
     Pic.Image = Image.FromFile(CurrPath + "\\Image\\no.JPG");
     PicPath.Text = "";
 }
Exemple #4
0
        /// <summary>
        /// 根据listbox中选择的位置 刷新画面
        /// </summary>
        /// <param name="i"></param>
        private void FlashUI(int i)
        {
            DateDef.图片 图片Info = null;
            if (listBox1.Items.Count > 0 && dic图片.Count > 0)
            {
                图片Info = dic图片[listBox1.Items[i].ToString()];

                if (图片Info != null)
                {

                    tx概要.Text = 图片Info.B概要;
                    tx图片说明.Text = 图片Info.B图片说明;
                    Pic.Image = ByteArrayToImage(图片Info.B图片, 图片Info.B图片.Length);
                }
            }
            else
            {
                图片Info = new DateDef.图片(strPointCode);
                tx概要.Text = 图片Info.B概要;
                tx图片说明.Text = 图片Info.B图片说明;
                Pic.Image = Image.FromFile(CurrPath + "\\Image\\no.JPG");
            }
        }