Ejemplo n.º 1
0
        private void 新增ToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (!PowerCheckCsClass.IfHasPower(LoginClass.LogID, CommFunction.GSYSNAME, sender, CommFunction.ConnectString))
            {
                return;
            }
            FrmEditIceLocn.falg = "Add";
            FrmEditIceLocn.ShowUniqueForm(true);
            if (FrmEditIceLocn.ifSave)
            {
                string sql = "select LOCN_BRCD 库位代码,STORE_CONDITION 存储条件 from locn_master where  LOCN_BRCD in (" + FrmEditIceLocn.ResultKwdm + "') order by  LOCN_BRCD";

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

                dataGridView1.DataSource = ds.Tables["chk_con2"];
                dataGridView1.AutoResizeColumns();
            }
        }
Ejemplo n.º 2
0
        private void 修改ToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (!PowerCheckCsClass.IfHasPower(LoginClass.LogID, CommFunction.GSYSNAME, sender, CommFunction.ConnectString))
            {
                return;
            }
            if (dataGridView1.Rows.Count <= 0)
            {
                return;
            }
            FrmEditIceLocn.falg  = "Edit";
            FrmEditIceLocn.pKwdm = dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells["库位代码"].Value.ToString();
            FrmEditIceLocn.pCctj = dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells["存储条件"].Value.ToString();
            FrmEditIceLocn.ShowUniqueForm(true);
            if (FrmEditIceLocn.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();
            }
        }