Exemple #1
0
        /// <summary>
        /// 查询下一条信息事件
        /// </summary>
        private void btnDown_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, sender, true))
                {
                    return;
                }

                DataTable tmpTable = new DataTable();
                ddDAO.QueryDeliveryDetail_DownOne(tmpTable, currentAutoIdInt, querySMNo);
                if (tmpTable.Rows.Count > 0)
                {
                    TableDeliveryDetail.Rows.Clear();
                    TableDeliveryDetail.ImportRow(tmpTable.Rows[0]);
                    currentAutoIdInt = DataTypeConvert.GetInt(tmpTable.Rows[0]["AutoId"]);
                    TableMaterialDetail.Rows.Clear();
                    ddDAO.QueryMaterialDetail(TableMaterialDetail, currentAutoIdInt);
                }
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--查询下一条信息事件错误。", ex);
            }
        }
Exemple #2
0
 /// <summary>
 /// 查询上一条信息事件
 /// </summary>
 private void btnUp_Click(object sender, EventArgs e)
 {
     try
     {
         DataTable tmpTable = new DataTable();
         ddDAO.QueryDeliveryDetail_UpOne(tmpTable, currentAutoIdInt, querySMNo);
         if (tmpTable.Rows.Count > 0)
         {
             TableDeliveryDetail.Rows.Clear();
             TableDeliveryDetail.ImportRow(tmpTable.Rows[0]);
             currentAutoIdInt = DataTypeConvert.GetInt(tmpTable.Rows[0]["AutoId"]);
             TableMaterialDetail.Rows.Clear();
             ddDAO.QueryMaterialDetail(TableMaterialDetail, currentAutoIdInt);
         }
     }
     catch (Exception ex)
     {
         ExceptionHandler.HandleException(this.Text + "--查询上一条信息事件错误。", ex);
     }
 }