Sell/SellFind.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using GoodsReportManage.ItemClass;

namespace GoodsReportManage.Sell
{
    public partial class SellFind : Form
    {
        public SellFind()
        {
            InitializeComponent();
        }

        SqlBaseClass G_SqlClass = new SqlBaseClass();

        /// <summary>
        /// 在控件中填充选中的DataGridView控件的数据
        /// </summary>
        private void FillControls()
        {
            try
            {
                this.labGoodsID.Text = this.dgvStockInfo[1, this.dgvStockInfo.CurrentCell.RowIndex].Value.ToString();
                this.labGoodsName.Text = this.dgvStockInfo[2, this.dgvStockInfo.CurrentCell.RowIndex].Value.ToString();
                this.labGoodsSpec.Text = this.dgvStockInfo[6, this.dgvStockInfo.CurrentCell.RowIndex].Value.ToString();
                this.labNum.Text = this.dgvStockInfo[3, this.dgvStockInfo.CurrentCell.RowIndex].Value.ToString();
                this.labRMoney.Text = this.dgvStockInfo[9, this.dgvStockInfo.CurrentCell.RowIndex].Value.ToString();
                this.labGoodsPrice.Text = this.dgvStockInfo[8, this.dgvStockInfo.CurrentCell.RowIndex].Value.ToString();
                this.labHasPay.Text = this.dgvStockInfo[10, this.dgvStockInfo.CurrentCell.RowIndex].Value.ToString();
            }
            catch { }
        }

        private void SellFind_Load(object sender, EventArgs e)
        {
            string P_Str_cmdtxt = "SELECT SellID as 销售ID,GoodsID as 商品ID,GoodsName as 商品名称,GoodsNum as 销售数量";
            P_Str_cmdtxt += ",GoodsUnit as 商品单位,GoodsTime as 销售时间,GoodsSpec as 商品规格,GoodsPrice as 进货价格,SellPrice as 销售价格";
            P_Str_cmdtxt += ",NeedPay as 应收金额,HasPay as 实收金额,Remark as 备注 FROM tb_Sell";
            this.dgvStockInfo.DataSource = G_SqlClass.GetDs(P_Str_cmdtxt).Tables[0];

            this.cbxCondition1.SelectedIndex = 0;
            this.cbxCondition2.SelectedIndex = 0;
        }

        private void btnFindOK_Click(object sender, EventArgs e)
        {
            string P_Str_select = " WHERE SellID LIKE '%"+this.txtSellID.Text+"%' AND GoodsName LIKE '%" + this.txtGoodsName.Text + "%'";
            P_Str_select += " AND GoodsID LIKE '%" + this.txtGoodsID.Text + "%' AND GoodsNum LIKE '%" + this.txtStockNum.Text + "%' ";
            if (this.txtGoodsPrice.Text != "")
            {
                P_Str_select += " AND GoodsPrice " + this.cbxCondition1.Items[this.cbxCondition1.SelectedIndex].ToString() + this.txtGoodsPrice.Text + "";
            }
            if (this.txtSellPrice.Text != "")
            {
后面还有 30 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。