コード例 #1
0
ファイル: FormFPCX.cs プロジェクト: rebider/businessPro
        private void dataGridViewDJMX_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dataGridViewDJMX.Rows[e.RowIndex].IsNewRow)
            {
                return;
            }

            if (dataGridViewDJMX.Rows[e.RowIndex].Cells[0].Value.ToString() == "")
            {
                return;
            }

            int iDJID = 0;

            iDJID = Convert.ToInt32(dataGridViewDJMX.Rows[e.RowIndex].Cells[0].Value.ToString());

            // 创建此子窗体的一个新实例。
            FormFPKJ childFormFPKJ = new FormFPKJ();

            // 在显示该窗体前使其成为此 MDI 窗体的子窗体。
            childFormFPKJ.MdiParent = this.MdiParent;

            childFormFPKJ.strConn = strConn;
            childFormFPKJ.iDJID   = iDJID;
            childFormFPKJ.isSaved = true;

            childFormFPKJ.intUserID    = intUserID;
            childFormFPKJ.intUserLimit = intUserLimit;
            childFormFPKJ.strUserLimit = strUserLimit;
            childFormFPKJ.strUserName  = strUserName;

            childFormFPKJ.Show();
        }
コード例 #2
0
ファイル: FormFPCX.cs プロジェクト: rebider/businessPro
        private void dataGridViewDJMX_DoubleClick(object sender, EventArgs e)
        {
            if (dataGridViewDJMX.SelectedRows.Count < 1)
            {
                return;
            }

            if (dataGridViewDJMX.SelectedRows[0].Cells[0].Value.ToString() == "")
            {
                return;
            }

            int  iDJID  = 0;
            bool bHasFP = true;

            try
            {
                iDJID = Convert.ToInt32(dataGridViewDJMX.SelectedRows[0].Cells[0].Value.ToString());
            }
            catch
            {
                bHasFP = false;
            }

            if (bHasFP)
            {
                // 创建此子窗体的一个新实例。
                FormFPKJ childFormFPKJ = new FormFPKJ();
                // 在显示该窗体前使其成为此 MDI 窗体的子窗体。
                childFormFPKJ.MdiParent = this.MdiParent;

                childFormFPKJ.strConn = strConn;
                childFormFPKJ.iDJID   = iDJID;
                childFormFPKJ.isSaved = true;

                childFormFPKJ.intUserID    = intUserID;
                childFormFPKJ.intUserLimit = intUserLimit;
                childFormFPKJ.strUserLimit = strUserLimit;
                childFormFPKJ.strUserName  = strUserName;

                childFormFPKJ.Show();
            }
            else //单据明细
            {
                try
                {
                    iDJID = Convert.ToInt32(dataGridViewDJMX.SelectedRows[0].Cells[1].Value.ToString());
                }
                catch
                {
                    return;
                }

                DJZX(dataGridViewDJMX.SelectedRows[0].Cells[0].Value.ToString(), iDJID);
            }
        }