예제 #1
0
 /// <summary>
 /// 列表双击查看出入库单配件明细
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void gvAllocBillList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.RowIndex > -1 && e.ColumnIndex > -1)                                               //双击表头或列头时不起作用
         {
             string InOutIdValue = gvAllocBillList.CurrentRow.Cells["Inout_Id"].Value.ToString(); //获取出入库单ID
             UCAllocationBillDetails UCAllocBillDetails = new UCAllocationBillDetails(InOutIdValue);
             base.addUserControl(UCAllocBillDetails, "出入库单-查看", "UCAllocBillDetails", this.Tag.ToString(), this.Name);
         }
     }
     catch (Exception ex)
     {
         MessageBoxEx.Show(ex.Message, "异常提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
     }
 }
        /// <summary>
        /// 列表双击查看出入库单配件明细
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void gvAllocBillList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex > -1 && e.ColumnIndex > -1)//双击表头或列头时不起作用   
                {
                    string InOutIdValue = gvAllocBillList.CurrentRow.Cells["Inout_Id"].Value.ToString();//获取出入库单ID
                    string WHName = gvAllocBillList.CurrentRow.Cells["WHName"].Value.ToString();//获取当前出入库单仓库名称
                    UCAllocationBillDetails UCAllocBillDetails = new UCAllocationBillDetails(InOutIdValue, WHName);
                    base.addUserControl(UCAllocBillDetails, "出入库单-查看", "UCAllocBillDetails", this.Tag.ToString(), this.Name);
                }
            }
            catch (Exception ex)
            {
                MessageBoxEx.Show(ex.Message, "异常提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
            }

        }