Exemplo n.º 1
0
        private void 修改ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!PowerCheckCsClass.IfHasPower(LoginClass.LogID, CommFunction.GSYSNAME, sender, CommFunction.ConnectString))
            {
                return;
            }
            if (dataGridView1.Rows.Count <= 0)
            {
                return;
            }
            FrmEditItem.falg    = "Edit";
            FrmEditItem.pSku_id = dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[0].Value.ToString();
            FrmEditItem.pHz     = dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[1].Value.ToString();
            FrmEditItem.pSpdm   = dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[2].Value.ToString();
            FrmEditItem.pPmgg   = dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[3].Value.ToString();
            FrmEditItem.pSccj   = dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[5].Value.ToString();
            FrmEditItem.pLlbs   = dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[4].Value.ToString();
            FrmEditItem.pCctj   = dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[6].Value.ToString();
            FrmEditItem.pJzs    = dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[11].Value.ToString();
            FrmEditItem.pWdj    = dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[7].Value.ToString();
            FrmEditItem.pBzlxZ  = dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[12].Value.ToString();
            FrmEditItem.pBzlxL  = dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[13].Value.ToString();
            FrmEditItem.pRpt    = dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[14].Value.ToString();
            FrmEditItem.ShowUniqueForm(true);
            if (FrmEditItem.ifSave)
            {
                OleDbDataAdapter sda = new OleDbDataAdapter(ResultSelect, CommFunction.ConnectString);
                DataSet          ds  = new DataSet();
                sda.Fill(ds, "chk_con2");

                dataGridView1.DataSource = ds.Tables["chk_con2"];
                dataGridView1.AutoResizeColumns();
            }
        }
Exemplo n.º 2
0
        private void 新增ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!PowerCheckCsClass.IfHasPower(LoginClass.LogID, CommFunction.GSYSNAME, sender, CommFunction.ConnectString))
            {
                return;
            }
            FrmEditItem.falg = "Add";
            FrmEditItem.ShowUniqueForm(true);
            if (FrmEditItem.ifSave)
            {
                string sql = "select sku_id,season 货主,size_desc 商品代码,sku_desc 品名规格,cc_flag 冷链标示,manufacturer 生产厂家," +
                             "storage_conditions 存储条件,therm_company 温度计所属单位,pym 拼音码,create_date_time 创建时间,user_name 操作人员," +
                             "std_pack_qty 件装数,pack_type_z 整件包装类型,pack_type_l 零散包装类型,REPORT_FILE 跟踪报表名称 from cc_item_master where 1=1 and sku_id in (" + FrmEditItem.ResultSku_id + "')";

                OleDbDataAdapter sda = new OleDbDataAdapter(sql, CommFunction.ConnectString);
                DataSet          ds  = new DataSet();
                sda.Fill(ds, "chk_con2");

                dataGridView1.DataSource = ds.Tables["chk_con2"];
                dataGridView1.AutoResizeColumns();
            }
        }
Exemplo n.º 3
0
 private void FrmEditItem_FormClosed(object sender, FormClosedEventArgs e)
 {
     pUniqueForm = null;//窗体唯一打开代码
 }
Exemplo n.º 4
0
        private static FrmEditItem pUniqueForm = null; //窗体唯一打开代码

        #endregion Fields

        #region Constructors

        public FrmEditItem()
        {
            pUniqueForm = this;//窗体唯一打开代码
            InitializeComponent();
        }
Exemplo n.º 5
0
 private void FrmEditItem_FormClosed(object sender, FormClosedEventArgs e)
 {
     pUniqueForm = null;//窗体唯一打开代码
 }
Exemplo n.º 6
0
 public FrmEditItem()
 {
     pUniqueForm = this;//窗体唯一打开代码
     InitializeComponent();
 }