예제 #1
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;
            }
            if (dataGridView2.Rows.Count <= 0)
            {
                return;
            }
            FrmEditVendor.falg    = "Edit";
            FrmEditVendor.pUnid   = dataGridView2.Rows[dataGridView2.CurrentCell.RowIndex].Cells["unid"].Value.ToString();
            FrmEditVendor.pCk     = dataGridView2.Rows[dataGridView2.CurrentCell.RowIndex].Cells["仓库"].Value.ToString();
            FrmEditVendor.pHz     = dataGridView2.Rows[dataGridView2.CurrentCell.RowIndex].Cells["货主"].Value.ToString();
            FrmEditVendor.pHzkhdm = dataGridView2.Rows[dataGridView2.CurrentCell.RowIndex].Cells["货主客户代码"].Value.ToString();
            FrmEditVendor.pFwdj   = dataGridView2.Rows[dataGridView2.CurrentCell.RowIndex].Cells["是否附温度计"].Value.ToString();
            FrmEditVendor.pTh     = dataGridView2.Rows[dataGridView2.CurrentCell.RowIndex].Cells["温度计类型"].Value.ToString();
            FrmEditVendor.ShowUniqueForm(true);
            if (FrmEditVendor.ifSave)
            {
                string sql = "select unid,misc_instr_code_2 货主客户代码,whse 仓库,season 货主,ifthermometer 是否附温度计,therm_type 温度计类型 " +
                             "from cc_vendor_track where misc_instr_code_2='" + dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells["货主客户代码"].Value.ToString() + "'";

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

                dataGridView2.DataSource = ds.Tables["chk_con2"];
                dataGridView2.AutoResizeColumns();
            }
        }
예제 #2
0
 private void FrmEditVendor_FormClosed(object sender, FormClosedEventArgs e)
 {
     pUniqueForm = null;//窗体唯一打开代码
 }
예제 #3
0
        private static FrmEditVendor pUniqueForm = null; //窗体唯一打开代码

        #endregion Fields

        #region Constructors

        public FrmEditVendor()
        {
            pUniqueForm = this;//窗体唯一打开代码
            InitializeComponent();
        }
예제 #4
0
 private void FrmEditVendor_FormClosed(object sender, FormClosedEventArgs e)
 {
     pUniqueForm = null;//窗体唯一打开代码
 }
예제 #5
0
 public FrmEditVendor()
 {
     pUniqueForm = this;//窗体唯一打开代码
     InitializeComponent();
 }