Exemple #1
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            //验证输入的文本必须为阿拉伯数字。
            for (int i = 0; i < txtUpperLimit.Text.Length; i++)
            {
                if (!Char.IsNumber(txtUpperLimit.Text, i))
                {
                    MessageBox.Show("库存上限设置必须为阿拉伯数字!", "错误提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
            }
            for (int i = 0; i < txtLowerLimit.Text.Length; i++)
            {
                if (!Char.IsNumber(txtLowerLimit.Text, i))
                {
                    MessageBox.Show("库存上限设置必须为阿拉伯数字!", "错误提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
            }
            //更新数据
            BaseClass.BaseInfo baseinfo = new BaseClass.BaseInfo();
            cStockInfo         stock    = new cStockInfo();

            stock.TradeCode  = groupBox1.Text.Substring(1, 5);
            stock.UpperLimit = Convert.ToSingle(txtUpperLimit.Text);
            stock.LowerLimit = Convert.ToSingle(txtLowerLimit.Text);
            int d = baseinfo.UpdateStockLimit(stock);

            MessageBox.Show("库存上下限设置成功!", "成功提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            Close();
        }
Exemple #2
0
        private void SelectStock_Load(object sender, EventArgs e)
        {
            BaseClass.BaseInfo baseinfo = new BaseClass.BaseInfo();
            DataSet            ds       = baseinfo.GetAllStock("tb_Stock");

            dgvSelectStockList.DataSource = ds.Tables[0].DefaultView;

            dgvSelectStockList.Columns[0].HeaderText  = "商品编号";
            dgvSelectStockList.Columns[0].Width       = 80;
            dgvSelectStockList.Columns[1].HeaderText  = "商品名称";
            dgvSelectStockList.Columns[2].HeaderText  = "商品型号";
            dgvSelectStockList.Columns[2].Width       = 80;
            dgvSelectStockList.Columns[3].HeaderText  = "商品规格";
            dgvSelectStockList.Columns[3].Width       = 80;
            dgvSelectStockList.Columns[4].Visible     = false;
            dgvSelectStockList.Columns[5].Visible     = false;
            dgvSelectStockList.Columns[6].HeaderText  = "库存数量";
            dgvSelectStockList.Columns[6].Width       = 80;
            dgvSelectStockList.Columns[7].Visible     = false;
            dgvSelectStockList.Columns[8].Visible     = false;
            dgvSelectStockList.Columns[9].Visible     = false;
            dgvSelectStockList.Columns[10].HeaderText = "盘点数量";
            dgvSelectStockList.Columns[10].Width      = 80;
            dgvSelectStockList.Columns[11].Visible    = false;
            dgvSelectStockList.Columns[12].Visible    = false;
        }
Exemple #3
0
        private void frmUpperLimit_Load(object sender, EventArgs e)
        {
            BaseClass.BaseInfo baseinfo = new BaseClass.BaseInfo();
            DataSet            ds       = null;

            ds = baseinfo.GetUpperLimit();
            dgvStockList.DataSource = ds.Tables[0].DefaultView;
        }
        private void selectHandle_Load(object sender, EventArgs e)
        {
            BaseClass.BaseInfo baseinfo = new BaseClass.BaseInfo();
            DataSet            ds       = baseinfo.GetAllEmployee("tb_employee");

            dgvSelectHandleList.DataSource = ds.Tables[0].DefaultView;

            //设置列表标题
            dgvSelectHandleList.Columns[0].HeaderText = "职员编号";
            dgvSelectHandleList.Columns[1].HeaderText = "职员姓名";
            dgvSelectHandleList.Columns[2].HeaderText = "性别";
            dgvSelectHandleList.Columns[3].HeaderText = "所在部门";
            dgvSelectHandleList.Columns[4].HeaderText = "联系电话";
            dgvSelectHandleList.Columns[5].HeaderText = "备注";
        }
        private void SelectUnits_Load(object sender, EventArgs e)
        {
            BaseClass.BaseInfo baseinfo = new BaseClass.BaseInfo();
            DataSet            ds       = baseinfo.GetAllUnits("tb_Units");

            dgvSelectUnitsList.DataSource = ds.Tables[0].DefaultView;

            //设置列表标题
            dgvSelectUnitsList.Columns[0].HeaderText = "单位编号";
            dgvSelectUnitsList.Columns[1].HeaderText = "单位名称";
            dgvSelectUnitsList.Columns[2].HeaderText = "税号";
            dgvSelectUnitsList.Columns[3].HeaderText = "单位电话";
            dgvSelectUnitsList.Columns[4].HeaderText = "联系人";
            dgvSelectUnitsList.Columns[5].HeaderText = "单位地址";
            dgvSelectUnitsList.Columns[6].HeaderText = "开户行及账号";
            dgvSelectUnitsList.Columns[7].HeaderText = "累计应收款";
            dgvSelectUnitsList.Columns[8].HeaderText = "累计应付款";
        }