窗体-进销存管理系统C#中,什么存在二义性,inputDataGridArray[0]这里不懂怎么改

问题描述

进销存管理系统C#中,什么存在二义性,inputDataGridArray[0]这里不懂怎么改

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;

namespace 进销存管理系统
{
public partial class StockTable : Form
{
private LinkDataBase link = new LinkDataBase();
private DataTable newTable;
//保存从”供货商信息维护”窗体中选择后传过来的数据,它们将被放入DataGrid的相 应表格中
public static string[] inputDataGridArray = new string[]{null,null,null};
//保存从”供货商信息维护”窗体中选择后传过来的数据,它们将被赋值给供货商号和名称
//的控件Text属性
//确定要赋的值为文本,故用空字符初始化
public static string[] inputDataGridArray = new string[] {"",""};
private DateTime gridMouseDownTime;//记录单击DateGrid时的时间

    public StockTable()
    {
        InitializeComponent();
         this.selectDataBase();
         this.DataGridStateControl();
         this.cmb_StokerID.Items.Add("");
    }
    public void setWareData()
    {

dgrd_StockTable[dgrd_StockTable.CurrentCell.RowNumber,0]=inputDataGridArray[0];
dgrd_StockTable[dgrd_StockTable.CurrentCell.RowNumber,4]=inputDataGridArray[1];
dgrd_StockTable[dgrd_StockTable.CurrentCell.RowNumber,5]=inputDataGridArray[2];
dgrd_StockTable[dgrd_StockTable.CurrentCell.RowNumber,7]=17;

    }
    private void setTextData()
    {
        this .cmb_StokerID.IntegralHeight = false;
        this .cmb_StokerID.DroppedDown = false;
        this .cmb_StokerID.Items[0] = inputDataGridArray[0];
        this .cmb_StokerID.SelectedIndex= 0;
        this.txt_StokerName.Text= inputDataGridArray [1];
        this .cmb_StokerID.IntegralHeight = true ;
     }

      private void selectDataBase()
     {
        this .txt_StockDate.Text = System .DateTime .Today.ToShortDateString ();
        string tempStrSQL = "select distinct 姓名from 用户清单";
        DataTable  tempDataTable = link.SelectDataBase(tempStrSQL);
        for (int i =0;i<tempDataTable .Rows .Count ;i++)
             this .cmb_Oprater.Items.Add(tempDataTable.Rows [i][0]);
         this.cmb_Oprater.SelectedIndex = 0;
     }

    private void DataGridStateControl()
 {
     newTable = new DataTable ();
     newTable.Columns.Add("货号(双击)",typeof (string ));
     newTable.Columns.Add("数量",typeof (decimal  ));
     newTable.Columns.Add("单价",typeof (decimal  ));
     newTable.Columns.Add("仓库",typeof(string  ));
     newTable.Columns.Add("品名",typeof (string   ));
     newTable.Columns.Add("单位",typeof (string   ));
     newTable.Columns.Add("金额",typeof (decimal  ),"数量单价?");

     newTable.Columns.Add("税率",typeof (decimal  ));
     newTable.Columns.Add("不含税额",typeof (decimal  ),"金额/1.17");
     newTable.Columns.Add("税额",typeof (decimal  ),"金额-不含税额");

        this .dgrd_StockTable.DataSource= newTable;
        newTable.Rows.Add(newTable.NewRow());
        DataGridTableStyle ts = new DataGridTableStyle ();
        DataGridTextBoxColumn aColumnTextColumn;
        ts.AllowSorting = false ;
        ts.AlternatingBackColor = Color .LightGray ;
        ts.MappingName = newTable.TableName;
        int numCols = newTable.Columns.Count;
        for (int i =0;i <numCols ;i++)
        {
        aColumnTextColumn  = new DataGridTextBoxColumn ();
            if (i!=0&&i!=1&&i!=2&&i!=3)
            {
            aColumnTextColumn .ReadOnly  = true ;

            }
        if (i==0)
        {
        aColumnTextColumn .TextBox .MouseDown += new MouseEventHandler
            (TextBoxMouseDownHandler);
        }
            if (i==4)
            {
            aColumnTextColumn .Width =160;
            }
        if (i==3)
        {
        string sendStrSQL ="select distinct仓库from 库存库a order by 仓库ASC";
            DataTable tempTable = this .link.SelectDataBase(sendStrSQL );
        }
        else
        {
        aColumnTextColumn .MappingName = newTable.Columns[i].ColumnName;
        aColumnTextColumn .HeaderText = newTable.Columns[i].ColumnName;
        aColumnTextColumn .NullText= "";
            aColumnTextColumn .Format= "N";
            ts .GridColumnStyles.Add(aColumnTextColumn );

        }

      }
        this .dgrd_StockTable.TableStyles.Add(ts);

    }

    private void toolBar1_Button_Click(object sender,System .Windows .Forms .
        ToolBarButtonClickEventArgs  e)
    {
    if (e.Button .ToolTipText =="保存修改?")
    {
        clickedSaveIcon();
    }
    else if (e.Button .ToolTipText =="删除数据")
    {
       try
       {
          if (newTable.Rows.Count>0)
          {
              this .newTable.Rows.RemoveAt(this .dgrd_StockTable.CurrentCell.RowNumber);
                   this .controlCalculate();
           }

          if (newTable.Rows.Count-1<=0)

             newTable.Rows.Add(newTable.NewRow());
       }
         catch
        {
           return;
        }
    }
    else if (e.Button.ToolTipText==" 打印报表")
    {
        }

}
//------------创建窗体,共用户选择供货商------------
private void cmd_Stoker_DropDown(object sender ,System.EventArgs e)
{
StokerDataManage newFrm= new StokerDataManage();
newFrm.setDataGridReadOnly();
newFrm.ShowDialog();
setTextData();
SendKeys.Send("{Tab}"); //向活动应用程序发送Tab键,跳到下一控件
}

解决方案

public static string[] inputDataGridArray = new string[]{null,null,null};

public static string[] inputDataGridArray = new string[] {"",""};

同一个变量你定义了2次,你应该删除其中之一。

时间: 2024-09-17 04:23:00

窗体-进销存管理系统C#中,什么存在二义性,inputDataGridArray[0]这里不懂怎么改的相关文章

我需要VS2008和sql2000开发的超市进销存管理系统及源代码。毕业设计用、最后有论文

问题描述 我需要VS2008和sql2000开发的超市进销存管理系统及源代码.毕业设计用.最后有论文.在线等.明天就要交了.急 解决方案 解决方案二:自己去www.51ajax.com下载吧就搜索"超市进销存"或者"进销存"解决方案三:引用1楼的回复: 自己去www.51ajax.com下载吧就搜索"超市进销存"或者"进销存" 靠...网址怎么写成ajax了....是http://www.51aspx.com/解决方案四:1申

安卓APP与安卓APP后台、进销存管理系统 通信

问题描述 安卓APP与安卓APP后台.进销存管理系统 通信 想请教 安卓app客户端如何与安卓APP后台.进销存管理系统进行对接? 安卓主要有四个功能模块,各个模块之间的业务大体不相同,我想在用Java开发安卓APP客户端,asp.net开发安卓后台(提供APP模块商家注册.登录.维护信息.发布信息),模块之间的订单发到进销存管理系统. 管理系统的数据库是SQL Server,asp.net+C# 想用一种比较简单的方进行双方之间的数据通信和维护. 本人未开发过安卓应用,请指教. 解决方案 楼上

php版进销存管理系统源码

问题描述 php版进销存管理系统源码出售php版进销存管理系统源码一份,软件采用PHP开发完成,同时可根据您不同需求定制各种软件及二次开发.演示网址http://azword.cn用户:demo密码:demo.联系QQ1114034508Email:skyharp@live.cn 解决方案 解决方案二: 该回复于2009-10-19 10:49:22被版主删除解决方案三: 东方天琴进销存(php+mysql)演示地址:http://www.etqsoft.com/jxc2用户名:admin密码:

免费的药店进销存管理系统

免费的药店进销存管理系统指的是金药商药店管理系统,该系统针对我国http://www.aliyun.com/zixun/aggregation/32855.html">医药企业药品经营管理特点,结合管理实践和行业趋势,集进销存.财务.经营分析和GSP管理为一体,从医药企业经营的各个环节对资金流.物流.信息流进行系统的管理.是一款免费的专业药店管理软件,基础功能终身免费,软件界面设计简洁.美观.大方,其人性化的操作流程,使普通用户不需培训也能很快掌握软件操作使用方法,容易上手.包含"

手机进销存管理系统需求分析

随着竞争的日益激烈,如何降低成本越来越成为企业要解决的问题.对手机生产企业来讲,这涉及到原材料的进货渠道.销售情况及库存等方面的管理,管理的好坏对企业至关重要.而对手机经销商而言,渠道扁平化已是大势所趋,这使经销商对产品的进销存合理化提出了更高的要求.概括地讲,用户对进销存管理系统的需求具有普遍性.手机进销存管理系统适用于采购.销售和仓库部门,对采购.销售及仓库的业务全过程进行有效控制和跟踪.手机进销存管理系统可有效减少盲目采购.降低采购成本.合理控制库存.减少资金占用并提高市场灵敏度,提升企业

php 产品进销存管理系统开发实例教程(1/13)

首页文件 index.html <HTML> <HEAD> <TITLE> 产品进销存管理系统 </TITLE> </HEAD> <BODY> <table border="0" width="100%" cellpadding="2" height="12"> <tr> <td width="100%"&

征集好的进销存管理系统(B/S),最好有演示地址!

问题描述 先谢了! 解决方案 解决方案二:顶,也想看看啊解决方案三:UP解决方案四:这种东西好相不会放到网上吧解决方案五:我们毕业答辩的时候就是下了个进销存系统的,网上应该可以找到的解决方案六:B/S的,C/S的我正在努力做,以后再做一套B/S的,奶奶的,东西太多了,一个人做不过来解决方案七:呵呵,涉及到生产的,有流程,都有些难度解决方案八:up解决方案九:http://www.myeol.cn/Experience.aspx?tabid=3#thishttp://www.7fbbs.com/a

[合作]WinForm进销存管理系统

问题描述 本人目前有一个WinForm的进销存系统.需要一个"技术高手"一起合作完成.要求:熟练掌握WinForm,SQLServer,XML,至少全程参于过一个进销存系统的开发,人最好在深圳市区,可以及时对本人进行技术支持(线上支持/当面支持)主要负责技术指导及系统架构(酬劳万元).有意者请将您的简历发邮件给我:a.project.hi[at]163.com非高手勿扰! 解决方案 解决方案二:高手?解决方案三:要求:熟练掌握WinForm,SQLServer,XML,至少全程参于过一

Java从入门到精通 第28章企业进销存管理系统 数据库附加失败的问题

问题描述 想运行一下个这个例子,但总是在数据库附加时告诉附加失败,有附加成功并成功运行的大侠吗?实在是找不到附加失败的原因