Esempio n. 1
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, sender, true))
                {
                    return;
                }

                string requirementDateBeginStr = "";
                string requirementDateEndStr   = "";
                if (checkRequirementDate.Checked)
                {
                    if (dateRequirementDateBegin.EditValue == null || dateRequirementDateEnd.EditValue == null)
                    {
                        MessageHandler.ShowMessageBox("请购日期不能为空,请设置后重新进行查询。");
                        if (dateRequirementDateBegin.EditValue == null)
                        {
                            dateRequirementDateBegin.Focus();
                        }
                        else
                        {
                            dateRequirementDateEnd.Focus();
                        }
                        return;
                    }
                    requirementDateBeginStr = dateRequirementDateBegin.DateTime.ToString("yyyy-MM-dd");
                    requirementDateEndStr   = dateRequirementDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");
                }

                string projectNoStr = searchLookUpProjectNo.Text != "全部" ? DataTypeConvert.GetString(searchLookUpProjectNo.EditValue) : "";
                int    codeIdInt    = DataTypeConvert.GetInt(searchLookUpCodeFileName.EditValue);
                string commonStr    = textCommon.Text.Trim();
                dataSet_PrReqList.Tables[0].Clear();

                prReqDAO.QueryPrReqListDistribution(dataSet_PrReqList.Tables[0], requirementDateBeginStr, requirementDateEndStr, projectNoStr, codeIdInt, 0, commonStr, checkContainOk.Checked, checkContainPO.Checked);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (searchLookUpArrangement.Text == "")
                {
                    MessageHandler.ShowMessageBox("请选择要查询的执行人。");
                    searchLookUpArrangement.Focus();
                    return;
                }

                int arrangementId = DataTypeConvert.GetInt(searchLookUpArrangement.EditValue);

                dataSet_PrReqList.Tables[0].Clear();
                prReqDAO.QueryPrReqListDistribution(dataSet_PrReqList.Tables[0], "", "", "", 0, arrangementId, "", true, true);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
            }
        }