⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 出库信息删除.cs

📁 湖南岳阳电力部门 电力管理系统 .net C#开发的
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace 计量
{
    public partial class 出库信息删除 : Form
    {
        public 出库信息删除()
        {
            InitializeComponent();
        }

        private void 出库信息删除_Load(object sender, EventArgs e)
        {
            // TODO: 这行代码将数据加载到表“sqldatabase_DataDataSet.出入库明细表”中。您可以根据需要移动或移除它。
            this.出入库明细表TableAdapter.FillBy1(this.sqldatabase_DataDataSet.出入库明细表, "出库");
            this.comboBox2.SelectedIndex = 0;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                int ii = this.出入库明细表TableAdapter.DeleteQuery(this.comboBox1.Text.Trim());
                if (ii == 0) MessageBox.Show("删除失败");
                else MessageBox.Show("删除成功");
            }
            catch (Exception exc)
            {
                MessageBox.Show("删除出错" + exc.Message);
            }

            this.出入库明细表TableAdapter.FillBy1(this.sqldatabase_DataDataSet.出入库明细表, "出库");
        }

        private void button2_Click(object sender, EventArgs e)
        {
            string type = this.comboBox2.Text.Trim();
            string message = this.textBox1.Text.Trim();
            try
            {
                if (type == "票号")
                {
                    this.出入库明细表TableAdapter.FillBy_1(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else if (type == "库存ID")
                {
                    this.出入库明细表TableAdapter.FillBy_2(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else if (type == "领用单位")
                {
                    this.出入库明细表TableAdapter.FillBy_3(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else if (type == "领用用途")
                {
                    this.出入库明细表TableAdapter.FillBy_4(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else if (type == "资产类型")
                {
                    this.出入库明细表TableAdapter.FillBy_5(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else if (type == "数量")
                {
                    this.出入库明细表TableAdapter.FillBy_6(this.sqldatabase_DataDataSet.出入库明细表, int.Parse(message), "出库");
                }
                else if (type == "价格")
                {
                    this.出入库明细表TableAdapter.FillBy_7(this.sqldatabase_DataDataSet.出入库明细表, float.Parse(message), "出库");
                }
                else if (type == "总价")
                {
                    this.出入库明细表TableAdapter.FillBy_8(this.sqldatabase_DataDataSet.出入库明细表, float.Parse(message), "出库");
                }
                else if (type == "型号")
                {
                    this.出入库明细表TableAdapter.FillBy_9(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else if (type == "规格")
                {
                    this.出入库明细表TableAdapter.FillBy_10(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else if (type == "等级")
                {
                    this.出入库明细表TableAdapter.FillBy_11(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else if (type == "厂家")
                {
                    this.出入库明细表TableAdapter.FillBy_12(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else if (type == "出库类型")
                {
                    this.出入库明细表TableAdapter.FillBy_13(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else
                {
                    MessageBox.Show("没有找到记录");
                }
            }
            catch (Exception exc)
            {
                MessageBox.Show("输入有误"+exc.Message);
            }
        }

        private void button3_Click(object sender, EventArgs e)
        {
            this.出入库明细表TableAdapter.FillBy1(this.sqldatabase_DataDataSet.出入库明细表, "出库");
        }

        private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
        {
            string time = this.dateTimePicker1.Value.Date.ToString();
            this.出入库明细表TableAdapter.FillBy(this.sqldatabase_DataDataSet.出入库明细表, time, "出库");
        }

        private void button2_Click_1(object sender, EventArgs e)
        {
            string type = this.comboBox2.Text.Trim();
            string message = this.textBox1.Text.Trim();
            try
            {
                if (type == "票号")
                {
                    this.出入库明细表TableAdapter.FillBy_1(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else if (type == "库存ID")
                {
                    this.出入库明细表TableAdapter.FillBy_2(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else if (type == "领用单位")
                {
                    this.出入库明细表TableAdapter.FillBy_3(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else if (type == "领用用途")
                {
                    this.出入库明细表TableAdapter.FillBy_4(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else if (type == "资产类型")
                {
                    this.出入库明细表TableAdapter.FillBy_5(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else if (type == "数量")
                {
                    this.出入库明细表TableAdapter.FillBy_6(this.sqldatabase_DataDataSet.出入库明细表, int.Parse(message), "出库");
                }
                else if (type == "价格")
                {
                    this.出入库明细表TableAdapter.FillBy_7(this.sqldatabase_DataDataSet.出入库明细表, float.Parse(message), "出库");
                }
                else if (type == "总价")
                {
                    this.出入库明细表TableAdapter.FillBy_8(this.sqldatabase_DataDataSet.出入库明细表, float.Parse(message), "出库");
                }
                else if (type == "型号")
                {
                    this.出入库明细表TableAdapter.FillBy_9(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else if (type == "规格")
                {
                    this.出入库明细表TableAdapter.FillBy_10(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else if (type == "等级")
                {
                    this.出入库明细表TableAdapter.FillBy_11(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else if (type == "厂家")
                {
                    this.出入库明细表TableAdapter.FillBy_12(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else if (type == "出库类型")
                {
                    this.出入库明细表TableAdapter.FillBy_13(this.sqldatabase_DataDataSet.出入库明细表, message, "出库");
                }
                else
                {
                    MessageBox.Show("没有找到记录");
                }
            }
            catch (Exception exc)
            {
                MessageBox.Show("输入有误" + exc.Message);
            }

        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -