/// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (dateDurBegin.EditValue == null || dateDurEnd.EditValue == null)
                {
                    MessageHandler.ShowMessageBox("期间日期不能为空,请设置后重新进行查询。");
                    if (dateDurBegin.EditValue == null)
                    {
                        dateDurBegin.Focus();
                    }
                    else
                    {
                        dateDurEnd.Focus();
                    }
                    return;
                }
                string durDateBeginStr = dateDurBegin.DateTime.ToString("yyyy-MM-dd");
                string durDateEndStr   = dateDurEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");

                string repertoryNoStr  = lookUpRepertoryNo.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpRepertoryNo.EditValue) : "";
                string codeFileNameStr = searchLookUpCodeFileName.Text != "全部" ? DataTypeConvert.GetString(searchLookUpCodeFileName.EditValue) : "";
                string projectNameStr  = searchLookUpProjectNo.Text != "全部" ? searchLookUpProjectNo.Text : "";
                string commonStr       = textCommon.Text.Trim();

                string querySqlStr = wNowInfoDAO.QueryStockDurationTotal_SQL(dateDurBegin.DateTime.Date, durDateBeginStr, durDateEndStr, repertoryNoStr, projectNameStr, codeFileNameStr, commonStr);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);
                gridBottomWNowInfo.QueryGridData(ref dataSet_DurationStock, "DurationStock", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
            }
        }
Example #2
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, sender, true))
                {
                    return;
                }

                int repertoryIdInt = lookUpRepertoryId.ItemIndex > 0 ? DataTypeConvert.GetInt(lookUpRepertoryId.EditValue) : 0;
                int locationIdInt  = DataTypeConvert.GetInt(SearchLocationId.EditValue);
                //string codeFileNameStr = searchLookUpCodeFileName.Text != "全部" ? DataTypeConvert.GetString(searchLookUpCodeFileName.EditValue) : "";
                int    codeIdInt      = DataTypeConvert.GetInt(searchLookUpCodeFileName.EditValue);
                string projectNameStr = searchLookUpProjectNo.Text != "全部" ? searchLookUpProjectNo.Text : "";
                int    ShelfIdInt     = searchLookUpShelfId.Text != "全部" ? DataTypeConvert.GetInt(searchLookUpShelfId.EditValue) : 0;
                string commonStr      = textCommon.Text.Trim();

                string querySqlStr = wNowInfoDAO.QueryWarehouseNowInfo_SQL(codeIdInt, repertoryIdInt, locationIdInt, projectNameStr, ShelfIdInt, commonStr, !checkZero.Checked);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);
                gridBottomWNowInfo.QueryGridData(ref dataSet_WNowInfo, "WNowInfo", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCxansjcw.Text, ex);
            }
        }
Example #3
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (datePlanDateBegin.EditValue == null || datePlanDateEnd.EditValue == null)
                {
                    MessageHandler.ShowMessageBox(tsmiJhdhribnwk.Text); // ("计划到货日期不能为空,请设置后重新进行查询。");
                    if (datePlanDateBegin.EditValue == null)
                    {
                        datePlanDateBegin.Focus();
                    }
                    else
                    {
                        datePlanDateEnd.Focus();
                    }
                    return;
                }
                string planDateBeginStr  = datePlanDateBegin.DateTime.ToString("yyyy-MM-dd");
                string planDateEndStr    = datePlanDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");
                string orderDateBeginStr = "";
                string orderDateEndStr   = "";
                if (checkOrderDate.Checked)
                {
                    if (dateOrderDateBegin.EditValue == null || dateOrderDateEnd.EditValue == null)
                    {
                        MessageHandler.ShowMessageBox(tsmiDgrqbnwk.Text); // ("订购日期不能为空,请设置后重新进行查询。");
                        if (dateOrderDateBegin.EditValue == null)
                        {
                            dateOrderDateBegin.Focus();
                        }
                        else
                        {
                            dateOrderDateEnd.Focus();
                        }
                        return;
                    }
                    orderDateBeginStr = dateOrderDateBegin.DateTime.ToString("yyyy-MM-dd");
                    orderDateEndStr   = dateOrderDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");
                }

                string reqDepStr          = lookUpReqDep.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpReqDep.EditValue) : "";
                string purCategoryStr     = lookUpPurCategory.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpPurCategory.EditValue) : "";
                string bussinessBaseNoStr = DataTypeConvert.GetString(searchLookUpBussinessBaseNo.EditValue) != "全部" ? DataTypeConvert.GetString(searchLookUpBussinessBaseNo.EditValue) : "";
                int    reqStateInt        = CommonHandler.Get_OrderState_No(comboBoxReqState.Text);
                string projectNoStr       = searchLookUpProjectNo.Text != "全部" ? DataTypeConvert.GetString(searchLookUpProjectNo.EditValue) : "";
                string codeFileNameStr    = searchLookUpCodeFileName.Text != "全部" ? DataTypeConvert.GetString(searchLookUpCodeFileName.EditValue) : "";
                string commonStr          = textCommon.Text.Trim();
                dataSet_Order.Tables[0].Clear();

                string querySqlStr = orderDAO.QueryOrderList_Head_SQL(planDateBeginStr, planDateEndStr, orderDateBeginStr, orderDateEndStr, reqDepStr, purCategoryStr, bussinessBaseNoStr, reqStateInt, projectNoStr, codeFileNameStr, commonStr);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);
                gridBottomOrderHead.QueryGridData(ref dataSet_Order, "OrderHead", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCxansjcw.Text, ex);
            }
        }
Example #4
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, sender, true))
                {
                    return;
                }

                string projectNoStr = searchLookUpProjectNo.Text != "全部" ? DataTypeConvert.GetString(searchLookUpProjectNo.EditValue) : "";
                //string codeFileNameStr = searchLookUpCodeFileName.Text != "全部" ? DataTypeConvert.GetString(searchLookUpCodeFileName.EditValue) : "";
                int    codeIdInt  = DataTypeConvert.GetInt(searchLookUpCodeFileName.EditValue);
                int    creatorInt = DataTypeConvert.GetInt(searchLookUpCreator.EditValue);
                string commonStr  = textCommon.Text.Trim();

                dataSet_DesignBom.Tables[0].Rows.Clear();
                string querySqlStr = bomDAO.Query_DesignBomList_SQL(projectNoStr, codeIdInt, checkIsUse.Checked, creatorInt, commonStr, false);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);

                gridBottomOrderHead.QueryGridData(ref dataSet_DesignBom, "DesignBom", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
            }
        }
Example #5
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, sender, true))
                {
                    return;
                }

                if (dateOpDate.EditValue == null)
                {
                    MessageHandler.ShowMessageBox("操作日期不能为空,请设置后重新进行查询。");
                    dateOpDate.Focus();
                    return;
                }
                string opBeginStr = dateOpDate.DateTime.Date.ToString("yyyy-MM-dd");
                string opEndStr   = dateOpDate.DateTime.Date.AddDays(1).ToString("yyyy-MM-dd");

                int repertoryIdInt = lookUpRepertoryId.ItemIndex > 0 ? DataTypeConvert.GetInt(lookUpRepertoryId.EditValue) : 0;
                int locationIdInt  = DataTypeConvert.GetInt(SearchLocationId.EditValue);
                //string codeFileNameStr = searchLookUpCodeFileName.Text != "全部" ? DataTypeConvert.GetString(searchLookUpCodeFileName.EditValue) : "";
                int    codeIdInt    = DataTypeConvert.GetInt(searchLookUpCodeFileName.EditValue);
                int    shelfIdInt   = searchLookUpShelfId.Text != "全部" ? DataTypeConvert.GetInt(searchLookUpShelfId.EditValue) : 0;
                string projectNoStr = searchLookUpProjectNo.Text != "全部" ? DataTypeConvert.GetString(searchLookUpProjectNo.EditValue) : "";

                string querySqlStr = wNowInfoDAO.QueryProductOpenAccount_SQL(opBeginStr, opEndStr, repertoryIdInt, locationIdInt, projectNoStr, shelfIdInt, codeIdInt);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);
                gridBottomWNowInfo.QueryGridData(ref dataSet_OpenAccount, "OpenAccount", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
            }
        }
Example #6
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, sender, true))
                {
                    return;
                }

                string catgNameStr = lookUpCatgName.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpCatgName.EditValue) : "";
                int    materialInt = DataTypeConvert.GetInt(searchLookUpMaterial.EditValue);
                string brandStr    = lookUpBrand.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpBrand.EditValue) : "";
                string commonStr   = textCommon.Text.Trim();
                dSPartsCode.Tables[0].Clear();

                string querySqlStr = pcDAO.QueryPartsCode_SQL(dSPartsCode.Tables[0], catgNameStr, materialInt, brandStr, commonStr, false);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);
                gridBottomPrReq.QueryGridData(ref dSPartsCode, "PartsCode", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
            }
        }
Example #7
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (dateCurrentDateBegin.EditValue == null || dateCurrentDateEnd.EditValue == null)
                {
                    MessageHandler.ShowMessageBox("单据日期不能为空,请设置后重新进行查询。");
                    if (dateCurrentDateBegin.EditValue == null)
                    {
                        dateCurrentDateBegin.Focus();
                    }
                    else
                    {
                        dateCurrentDateEnd.Focus();
                    }
                    return;
                }
                string currentDateBeginStr = dateCurrentDateBegin.DateTime.ToString("yyyy-MM-dd");
                string currentDateEndStr   = dateCurrentDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");
                string reqDateBeginStr     = "";
                string reqDateEndStr       = "";
                if (checkReqDate.Checked)
                {
                    if (dateReqDateBegin.EditValue == null || dateReqDateEnd.EditValue == null)
                    {
                        MessageHandler.ShowMessageBox("需求日期不能为空,请设置后重新进行查询。");
                        if (dateReqDateBegin.EditValue == null)
                        {
                            dateReqDateBegin.Focus();
                        }
                        else
                        {
                            dateReqDateEnd.Focus();
                        }
                        return;
                    }
                    reqDateBeginStr = dateReqDateBegin.DateTime.ToString("yyyy-MM-dd");
                    reqDateEndStr   = dateReqDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");
                }

                string empNameStr = lookUpPrepared.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpPrepared.EditValue) : "";
                string commonStr  = textCommon.Text.Trim();

                dataSet_PSchedule.Tables[0].Clear();

                string querySqlStr = psDAO.QueryProductionSchedule_SQL(currentDateBeginStr, currentDateEndStr, reqDateBeginStr, reqDateEndStr, empNameStr, commonStr, false);

                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);

                gridBottomOrderHead.QueryGridData(ref dataSet_PSchedule, "ProductionSchedule", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
            }
        }
Example #8
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, sender, true))
                {
                    return;
                }

                if (dateRecordDateBegin.EditValue == null || dateRecordDateEnd.EditValue == null)
                {
                    MessageHandler.ShowMessageBox("登记日期不能为空,请设置后重新进行查询。");
                    if (dateRecordDateBegin.EditValue == null)
                    {
                        dateRecordDateBegin.Focus();
                    }
                    else
                    {
                        dateRecordDateEnd.Focus();
                    }
                    return;
                }
                string recordDateBeginStr = dateRecordDateBegin.DateTime.ToString("yyyy-MM-dd");
                string recordDateEndStr   = dateRecordDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");

                string bussinessBaseNoStr = DataTypeConvert.GetString(searchLookUpBussinessBaseNo.EditValue) != "全部" ? DataTypeConvert.GetString(searchLookUpBussinessBaseNo.EditValue) : "";
                int    creatorInt         = DataTypeConvert.GetInt(searchLookUpCreator.EditValue);
                string commonStr          = textCommon.Text.Trim();

                dataSet_Quotation.Tables[0].Rows.Clear();

                int qStateInt = -1;
                switch (lookUpQState.ItemIndex)
                {
                case 1:
                    qStateInt = 0;
                    break;

                case 2:
                    qStateInt = 1;
                    break;
                }

                string querySqlStr = quoDAO.QueryQuotationBaseInfoAndCor_SQL(recordDateBeginStr, recordDateEndStr, bussinessBaseNoStr, creatorInt, commonStr, qStateInt);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);

                gridBottomOrderHead.QueryGridData(ref dataSet_Quotation, "QuotationBaseInfo", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
            }
        }
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, sender, true))
                {
                    return;
                }

                if (dateWWDateBegin.EditValue == null || dateWWDateEnd.EditValue == null)
                {
                    MessageHandler.ShowMessageBox(tsmiRkrqbnwkcx.Text);// ("入库日期不能为空,请设置后重新进行查询。");
                    if (dateWWDateBegin.EditValue == null)
                    {
                        dateWWDateBegin.Focus();
                    }
                    else
                    {
                        dateWWDateEnd.Focus();
                    }
                    return;
                }
                string orderDateBeginStr = dateWWDateBegin.DateTime.ToString("yyyy-MM-dd");
                string orderDateEndStr   = dateWWDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");

                string reqDepStr          = lookUpReqDep.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpReqDep.EditValue) : "";
                string bussinessBaseNoStr = DataTypeConvert.GetString(searchLookUpBussinessBaseNo.EditValue) != "全部" ? DataTypeConvert.GetString(searchLookUpBussinessBaseNo.EditValue) : "";
                int    repertoryIdInt     = lookUpRepertoryId.ItemIndex > 0 ? DataTypeConvert.GetInt(lookUpRepertoryId.EditValue): 0;
                int    locationIdInt      = DataTypeConvert.GetInt(SearchLocationId.EditValue);
                string wwTypeNoStr        = lookUpWarehouseWarrantTypeNo.ItemIndex > 0 ? lookUpWarehouseWarrantTypeNo.EditValue.ToString() : "";

                int    warehouseStateInt = CommonHandler.Get_WarehouseState_No(comboBoxWarehouseState.Text);
                string projectNameStr    = searchLookUpProjectNo.Text != "全部" ? searchLookUpProjectNo.Text : "";
                //string codeFileNameStr = searchLookUpCodeFileName.Text != "全部" ? DataTypeConvert.GetString(searchLookUpCodeFileName.EditValue) : "";
                int    codeIdInt = DataTypeConvert.GetInt(searchLookUpCodeFileName.EditValue);
                string commonStr = textCommon.Text.Trim();

                dataSet_WW.Tables[0].Rows.Clear();
                string querySqlStr = wwDAO.Query_WWList_NoSettlement_SQL(orderDateBeginStr, orderDateEndStr, reqDepStr, bussinessBaseNoStr, repertoryIdInt, locationIdInt, wwTypeNoStr, warehouseStateInt, projectNameStr, codeIdInt, checkOverplus.Checked, commonStr);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);

                gridBottomOrderHead.QueryGridData(ref dataSet_WW, "WWList", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCxansjcw.Text, ex);
            }
        }
Example #10
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, sender, true))
                {
                    return;
                }

                if (dateWRDateBegin.EditValue == null || dateWRDateEnd.EditValue == null)
                {
                    MessageHandler.ShowMessageBox(tsmiCkrqbnwkcx.Text); // ("出库日期不能为空,请设置后重新进行查询。");
                    if (dateWRDateBegin.EditValue == null)
                    {
                        dateWRDateBegin.Focus();
                    }
                    else
                    {
                        dateWRDateEnd.Focus();
                    }
                    return;
                }
                string wrDateBeginStr = dateWRDateBegin.DateTime.ToString("yyyy-MM-dd");
                string wrDateEndStr   = dateWRDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");

                string reqDepStr        = lookUpReqDep.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpReqDep.EditValue) : "";
                int    repertoryIdInt   = lookUpRepertoryId.ItemIndex > 0 ? DataTypeConvert.GetInt(lookUpRepertoryId.EditValue) : 0;
                int    locationIdInt    = DataTypeConvert.GetInt(SearchLocationId.EditValue);
                string wrTypeNoStr      = lookUpWarehouseReceiptTypeNo.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpWarehouseReceiptTypeNo.EditValue) : "";
                string manufactureNoStr = lookUpManufactureNo.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpManufactureNo.EditValue) : "";

                int    warehouseStateInt = CommonHandler.Get_WarehouseState_No(comboBoxWarehouseState.Text);
                int    creatorInt        = DataTypeConvert.GetInt(searchLookUpCreator.EditValue);
                string commonStr         = textCommon.Text.Trim();

                dataSet_WR.Tables[0].Rows.Clear();
                string querySqlStr = wrDAO.QueryWarehouseReceiptHead_SQL(wrDateBeginStr, wrDateEndStr, reqDepStr, repertoryIdInt, locationIdInt, wrTypeNoStr, manufactureNoStr, warehouseStateInt, creatorInt, -1, commonStr, false);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);

                gridBottomOrderHead.QueryGridData(ref dataSet_WR, "WRHead", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCxansjcw.Text, ex);
            }
        }
Example #11
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, sender, true))
                {
                    return;
                }

                if (dateRGRDateBegin.EditValue == null || dateRGRDateEnd.EditValue == null)
                {
                    MessageHandler.ShowMessageBox("退货日期不能为空,请设置后重新进行查询。");
                    if (dateRGRDateBegin.EditValue == null)
                    {
                        dateRGRDateBegin.Focus();
                    }
                    else
                    {
                        dateRGRDateEnd.Focus();
                    }
                    return;
                }
                string rgrDateBeginStr = dateRGRDateBegin.DateTime.ToString("yyyy-MM-dd");
                string rgrDateEndStr   = dateRGRDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");

                string reqDepStr          = lookUpReqDep.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpReqDep.EditValue) : "";
                string bussinessBaseNoStr = DataTypeConvert.GetString(searchLookUpBussinessBaseNo.EditValue) != "全部" ? DataTypeConvert.GetString(searchLookUpBussinessBaseNo.EditValue) : "";
                int    repertoryIdInt     = lookUpRepertoryId.ItemIndex > 0 ? DataTypeConvert.GetInt(lookUpRepertoryId.EditValue) : 0;
                int    locationIdInt      = DataTypeConvert.GetInt(SearchLocationId.EditValue);

                int    warehouseStateInt = CommonHandler.Get_WarehouseState_No(comboBoxWarehouseState.Text);
                int    creatorInt        = DataTypeConvert.GetInt(searchLookUpCreator.EditValue);
                string commonStr         = textCommon.Text.Trim();

                dataSet_RGR.Tables[0].Rows.Clear();
                string querySqlStr = rgrDAO.QueryReturnedGoodsReportHead_SQL(rgrDateBeginStr, rgrDateEndStr, reqDepStr, bussinessBaseNoStr, repertoryIdInt, locationIdInt, warehouseStateInt, creatorInt, -1, commonStr, false);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);

                gridBottomOrderHead.QueryGridData(ref dataSet_RGR, "RGRHead", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
            }
        }
Example #12
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, sender, true))
                {
                    return;
                }

                if (datePlanDateBegin.EditValue == null || datePlanDateEnd.EditValue == null)
                {
                    MessageHandler.ShowMessageBox("计划日期不能为空,请设置后重新进行查询。");
                    if (datePlanDateBegin.EditValue == null)
                    {
                        datePlanDateBegin.Focus();
                    }
                    else
                    {
                        datePlanDateEnd.Focus();
                    }
                    return;
                }
                string reqDateBeginStr  = datePlanDateBegin.DateTime.ToString("yyyy-MM-dd");
                string reqDateEndStr    = datePlanDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");
                string manufactureNoStr = lookUpManufactureNo.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpManufactureNo.EditValue) : "";
                int    codeIdInt        = DataTypeConvert.GetInt(searchLookUpCodeFileName.EditValue);
                string projectNoStr     = searchLookUpProjectNo.Text != "全部" ? DataTypeConvert.GetString(searchLookUpProjectNo.EditValue) : "";

                int currentStateInt = CommonHandler.Get_OrderState_No(comboBoxCurrentStatus.Text);
                int creatorInt      = DataTypeConvert.GetInt(searchLookUpCreator.EditValue);
                int approverInt     = -1;

                string commonStr = textCommon.Text.Trim();
                dataSet_ProductionPlan.Tables[0].Rows.Clear();

                string querySqlStr = ppDAO.QueryProductionPlan_SQL(reqDateBeginStr, reqDateEndStr, codeIdInt, manufactureNoStr, projectNoStr, currentStateInt, creatorInt, approverInt, commonStr, false);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);

                gridBottomOrderHead.QueryGridData(ref dataSet_ProductionPlan, "ProductionPlan", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
            }
        }
Example #13
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, sender, true))
                {
                    return;
                }

                if (dateIMDateBegin.EditValue == null || dateIMDateEnd.EditValue == null)
                {
                    MessageHandler.ShowMessageBox(tsmiYdrqbnwkcx.Text);// ("移动日期不能为空,请设置后重新进行查询。");
                    if (dateIMDateBegin.EditValue == null)
                    {
                        dateIMDateBegin.Focus();
                    }
                    else
                    {
                        dateIMDateEnd.Focus();
                    }
                    return;
                }
                string orderDateBeginStr = dateIMDateBegin.DateTime.ToString("yyyy-MM-dd");
                string orderDateEndStr   = dateIMDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");

                int    inRepertoryIdInt  = lookUpInRepertoryId.ItemIndex > 0 ? DataTypeConvert.GetInt(lookUpInRepertoryId.EditValue) : 0;
                int    outRepertoryIdInt = lookUpOutRepertoryId.ItemIndex > 0 ? DataTypeConvert.GetInt(lookUpOutRepertoryId.EditValue) : 0;
                int    inLocationIdInt   = DataTypeConvert.GetInt(SearchInLocationId.EditValue);
                int    outLcationIdInt   = DataTypeConvert.GetInt(SearchOutLocationId.EditValue);
                string reqDepStr         = lookUpReqDep.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpReqDep.EditValue) : "";
                int    warehouseStateInt = CommonHandler.Get_WarehouseState_No(comboBoxWarehouseState.Text);
                int    creatorInt        = DataTypeConvert.GetInt(searchLookUpCreator.EditValue);
                string commonStr         = textCommon.Text.Trim();

                dataSet_IM.Tables[0].Clear();
                string querySqlStr = imDAO.QueryInventoryMoveHead_SQL(orderDateBeginStr, orderDateEndStr, inRepertoryIdInt, outRepertoryIdInt, inLocationIdInt, outLcationIdInt, reqDepStr, warehouseStateInt, creatorInt, -1, commonStr, false);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);
                gridBottomIM.QueryGridData(ref dataSet_IM, "IMHead", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCxansjcw.Text, ex);
            }
        }
Example #14
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (dateWWDateBegin.EditValue == null || dateWWDateEnd.EditValue == null)
                {
                    MessageHandler.ShowMessageBox(tsmiRkrqbnwkcx.Text);// ("入库日期不能为空,请设置后重新进行查询。");
                    if (dateWWDateBegin.EditValue == null)
                    {
                        dateWWDateBegin.Focus();
                    }
                    else
                    {
                        dateWWDateEnd.Focus();
                    }
                    return;
                }
                string orderDateBeginStr = dateWWDateBegin.DateTime.ToString("yyyy-MM-dd");
                string orderDateEndStr   = dateWWDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");

                string reqDepStr          = lookUpReqDep.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpReqDep.EditValue) : "";
                string bussinessBaseNoStr = DataTypeConvert.GetString(searchLookUpBussinessBaseNo.EditValue) != "全部" ? DataTypeConvert.GetString(searchLookUpBussinessBaseNo.EditValue) : "";
                string repertoryNoStr     = lookUpRepertoryNo.ItemIndex > 0 ? lookUpRepertoryNo.EditValue.ToString() : "";
                string wwTypeNoStr        = lookUpWarehouseWarrantTypeNo.ItemIndex > 0 ? lookUpWarehouseWarrantTypeNo.EditValue.ToString() : "";

                int    warehouseStateInt  = CommonHandler.Get_WarehouseState_No(comboBoxWarehouseState.Text);
                string empNameStr         = lookUpPrepared.ItemIndex > 0 ? lookUpPrepared.EditValue.ToString() : "";
                string commonStr          = textCommon.Text.Trim();
                int    orderListAutoIdInt = (checkorderListAutoId.Checked && spinorderListAutoId.Value > 0) ? DataTypeConvert.GetInt(spinorderListAutoId.Value) : 0;

                dataSet_WW.Tables[0].Rows.Clear();
                string querySqlStr = wwDAO.QueryWarehouseWarrantHead_SQL(orderDateBeginStr, orderDateEndStr, reqDepStr, bussinessBaseNoStr, repertoryNoStr, wwTypeNoStr, warehouseStateInt, empNameStr, -1, commonStr, orderListAutoIdInt, false);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);

                gridBottomOrderHead.QueryGridData(ref dataSet_WW, "WWHead", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCxansjcw.Text, ex);
            }
        }
Example #15
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, sender, true))
                {
                    return;
                }

                if (dateReqDateBegin.EditValue == null || dateReqDateEnd.EditValue == null)
                {
                    MessageHandler.ShowMessageBox(tsmiQgrq.Text);// ("请购日期不能为空,请设置后重新进行查询。");
                    if (dateReqDateBegin.EditValue == null)
                    {
                        dateReqDateBegin.Focus();
                    }
                    else
                    {
                        dateReqDateEnd.Focus();
                    }
                    return;
                }
                string reqDateBeginStr = dateReqDateBegin.DateTime.ToString("yyyy-MM-dd");
                string reqDateEndStr   = dateReqDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");
                string reqDepStr       = lookUpReqDep.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpReqDep.EditValue) : "";
                string purCategoryStr  = lookUpPurCategory.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpPurCategory.EditValue) : "";
                string projectNoStr    = searchLookUpProjectNo.Text != "全部" ? DataTypeConvert.GetString(searchLookUpProjectNo.EditValue) : "";
                int    reqStateInt     = CommonHandler.Get_OrderState_No(comboBoxReqState.Text);
                int    codeIdInt       = DataTypeConvert.GetInt(searchLookUpCodeFileName.EditValue);
                string commonStr       = textCommon.Text.Trim();
                dataSet_PrReq.Tables[0].Clear();

                string querySqlStr = prReqDAO.Query_PrReqListAndOrderList(reqDateBeginStr, reqDateEndStr, reqDepStr, purCategoryStr, projectNoStr, reqStateInt, codeIdInt, commonStr);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);
                gridBottomPrReq.QueryGridData(ref dataSet_PrReq, "PrReqList", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + tsmiCxan.Text, ex);
            }
        }
Example #16
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, sender, true))
                {
                    return;
                }

                if (dateSADateBegin.EditValue == null || dateSADateEnd.EditValue == null)
                {
                    MessageHandler.ShowMessageBox("结账日期不能为空,请设置后重新进行查询。");
                    if (dateSADateBegin.EditValue == null)
                    {
                        dateSADateBegin.Focus();
                    }
                    else
                    {
                        dateSADateEnd.Focus();
                    }
                    return;
                }
                string saDateBeginStr = dateSADateBegin.DateTime.ToString("yyyy-MM-dd");
                string saDateEndStr   = dateSADateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");

                string bussinessBaseNoStr = DataTypeConvert.GetString(searchLookUpBussinessBaseNo.EditValue) != "全部" ? DataTypeConvert.GetString(searchLookUpBussinessBaseNo.EditValue) : "";
                string reqDepStr          = lookUpReqDep.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpReqDep.EditValue) : "";
                int    creatorInt         = DataTypeConvert.GetInt(searchLookUpCreator.EditValue);
                string commonStr          = textCommon.Text.Trim();

                dataSet_SettleAccounts.Tables[0].Clear();

                string querySqlStr = saDAO.QuerySettleAccountsHead_SQL(saDateBeginStr, saDateEndStr, reqDepStr, bussinessBaseNoStr, creatorInt, commonStr, false);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);

                gridBottomOrderHead.QueryGridData(ref dataSet_SettleAccounts, "SettleAccountsHead", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
            }
        }
Example #17
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, sender, true))
                {
                    return;
                }

                if (dateGetTimeBegin.EditValue == null || dateGetTimeEnd.EditValue == null)
                {
                    MessageHandler.ShowMessageBox("登记日期不能为空,请设置后重新进行查询。");
                    if (dateGetTimeBegin.EditValue == null)
                    {
                        dateGetTimeBegin.Focus();
                    }
                    else
                    {
                        dateGetTimeEnd.Focus();
                    }
                    return;
                }
                string getDateBeginStr = dateGetTimeBegin.DateTime.ToString("yyyy-MM-dd");
                string getDateEndStr   = dateGetTimeEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");

                string smNoStr    = DataTypeConvert.GetString(searchLookUpStnModule.EditValue) != "全部" ? DataTypeConvert.GetString(searchLookUpStnModule.EditValue) : "";
                int    creatorInt = DataTypeConvert.GetInt(searchLookUpCreator.EditValue);
                string commonStr  = textCommon.Text.Trim();

                dataSet_StnModuleListInfo.Tables[0].Clear();

                string querySqlStr = smDAO.QueryStnModuleList_SQL(getDateBeginStr, getDateEndStr, smNoStr, creatorInt, commonStr, false);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);

                gridBottomOrderHead.QueryGridData(ref dataSet_StnModuleListInfo, "StnModuleListInfo", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
            }
        }
Example #18
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                string repertoryNoStr  = lookUpRepertoryNo.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpRepertoryNo.EditValue) : "";
                string codeFileNameStr = searchLookUpCodeFileName.Text != "全部" ? DataTypeConvert.GetString(searchLookUpCodeFileName.EditValue) : "";
                string projectNameStr  = searchLookUpProjectNo.Text != "全部" ? searchLookUpProjectNo.Text : "";
                string shelfNoStr      = searchLookUpShelf.Text != "全部" ? searchLookUpShelf.Text : "";
                string commonStr       = textCommon.Text.Trim();

                string querySqlStr = wNowInfoDAO.QueryWarehouseNowInfo_SQL(codeFileNameStr, repertoryNoStr, projectNameStr, shelfNoStr, commonStr, !checkZero.Checked);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);
                gridBottomWNowInfo.QueryGridData(ref dataSet_WNowInfo, "WNowInfo", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCxansjcw.Text, ex);
            }
        }
Example #19
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (dateSalesOrderDateBegin.EditValue == null || dateSalesOrderDateEnd.EditValue == null)
                {
                    MessageHandler.ShowMessageBox("登记日期不能为空,请设置后重新进行查询。");
                    if (dateSalesOrderDateBegin.EditValue == null)
                    {
                        dateSalesOrderDateBegin.Focus();
                    }
                    else
                    {
                        dateSalesOrderDateEnd.Focus();
                    }
                    return;
                }

                string recordDateBeginStr = dateSalesOrderDateBegin.DateTime.ToString("yyyy-MM-dd");
                string recordDateEndStr   = dateSalesOrderDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");

                string bussinessBaseNoStr = DataTypeConvert.GetString(searchLookUpBussinessBaseNo.EditValue) != "全部" ? DataTypeConvert.GetString(searchLookUpBussinessBaseNo.EditValue) : "";
                string projectNoStr       = searchProjectNo.Text != "全部" ? DataTypeConvert.GetString(searchProjectNo.EditValue) : "";
                string empNameStr         = lookUpPrepared.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpPrepared.EditValue) : "";
                string commonStr          = textCommon.Text.Trim();

                dataSet_SalesOrder.Tables[0].Rows.Clear();

                string querySqlStr = soDAO.QuerySalesOrderAndCor_SQL(recordDateBeginStr, recordDateEndStr, bussinessBaseNoStr, projectNoStr, empNameStr, commonStr);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);

                gridBottomOrderHead.QueryGridData(ref dataSet_SalesOrder, "SalesOrder", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
            }
        }
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (dateSWRDateBegin.EditValue == null || dateSWRDateEnd.EditValue == null)
                {
                    MessageHandler.ShowMessageBox("预算外出库日期不能为空,请设置后重新进行查询。");
                    if (dateSWRDateBegin.EditValue == null)
                    {
                        dateSWRDateBegin.Focus();
                    }
                    else
                    {
                        dateSWRDateEnd.Focus();
                    }
                    return;
                }
                string swrDateBeginStr = dateSWRDateBegin.DateTime.ToString("yyyy-MM-dd");
                string swrDateEndStr   = dateSWRDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");

                string reqDepStr      = lookUpReqDep.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpReqDep.EditValue) : "";
                string repertoryNoStr = lookUpRepertoryNo.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpRepertoryNo.EditValue) : "";

                int    warehouseStateInt = CommonHandler.Get_WarehouseState_No(comboBoxWarehouseState.Text);
                string empNameStr        = lookUpPrepared.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpPrepared.EditValue) : "";
                string commonStr         = textCommon.Text.Trim();

                dataSet_SWR.Tables[0].Rows.Clear();
                string querySqlStr = swrDAO.QuerySpecialWarehouseReceiptHead_SQL(swrDateBeginStr, swrDateEndStr, reqDepStr, repertoryNoStr, warehouseStateInt, empNameStr, -1, commonStr, false);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);

                gridBottomOrderHead.QueryGridData(ref dataSet_SWR, "SWRHead", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
            }
        }
Example #21
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (dateReqDateBegin.EditValue == null || dateReqDateEnd.EditValue == null)
                {
                    MessageHandler.ShowMessageBox(tsmiQgrq.Text);// ("请购日期不能为空,请设置后重新进行查询。");
                    if (dateReqDateBegin.EditValue == null)
                    {
                        dateReqDateBegin.Focus();
                    }
                    else
                    {
                        dateReqDateEnd.Focus();
                    }
                    return;
                }
                string reqDateBeginStr = dateReqDateBegin.DateTime.ToString("yyyy-MM-dd");
                string reqDateEndStr   = dateReqDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");
                string reqDepStr       = lookUpReqDep.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpReqDep.EditValue) : "";
                string purCategoryStr  = lookUpPurCategory.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpPurCategory.EditValue) : "";
                int    reqStateInt     = CommonHandler.Get_OrderState_No(comboBoxReqState.Text);
                string empNameStr      = lookUpApplicant.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpApplicant.EditValue) : "";
                string commonStr       = textCommon.Text.Trim();
                dataSet_PrReq.Tables[0].Clear();
                //prReqDAO.QueryPrReqHead(dataSet_PrReq.Tables[0], dateReqDateBegin.DateTime.ToString("yyyy-MM-dd"), dateReqDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd"), reqDepStr, purCategoryStr, reqStateInt, empNameStr, commonStr, false);

                string querySqlStr = prReqDAO.QueryPrReqHead_SQL(reqDateBeginStr, reqDateEndStr, reqDepStr, purCategoryStr, reqStateInt, empNameStr, -1, commonStr, false);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);
                gridBottomPrReq.QueryGridData(ref dataSet_PrReq, "PrReqHead", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + tsmiCxan.Text, ex);
            }
        }
Example #22
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (dateIADateBegin.EditValue == null || dateIADateEnd.EditValue == null)
                {
                    MessageHandler.ShowMessageBox(tsmiTzrqbnwkcx.Text); // ("调整日期不能为空,请设置后重新进行查询。");
                    if (dateIADateBegin.EditValue == null)
                    {
                        dateIADateBegin.Focus();
                    }
                    else
                    {
                        dateIADateEnd.Focus();
                    }
                    return;
                }
                string orderDateBeginStr = dateIADateBegin.DateTime.ToString("yyyy-MM-dd");
                string orderDateEndStr   = dateIADateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");

                string repertoryNoStr = lookUpAdjustmentsRepertoryNo.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpAdjustmentsRepertoryNo.EditValue) : "";
                string projectNoStr   = searchAdjustmentsProjectNo.Text != "全部" ? DataTypeConvert.GetString(searchAdjustmentsProjectNo.EditValue) : "";
                string reqDepStr      = lookUpReqDep.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpReqDep.EditValue) : "";
                string empNameStr     = lookUpPrepared.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpPrepared.EditValue) : "";
                string commonStr      = textCommon.Text.Trim();

                dataSet_IA.Tables[0].Clear();
                string querySqlStr = iaDAO.QueryInventoryAdjustmentsHead_SQL(orderDateBeginStr, orderDateEndStr, repertoryNoStr, projectNoStr, reqDepStr, empNameStr, commonStr, false);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);
                gridBottomIA.QueryGridData(ref dataSet_IA, "IAHead", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCxansjcw.Text, ex);
            }
        }
Example #23
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (dateGetTimeBegin.EditValue == null || dateGetTimeEnd.EditValue == null)
                {
                    MessageHandler.ShowMessageBox("登记日期不能为空,请设置后重新进行查询。");
                    if (dateGetTimeBegin.EditValue == null)
                    {
                        dateGetTimeBegin.Focus();
                    }
                    else
                    {
                        dateGetTimeEnd.Focus();
                    }
                    return;
                }
                string getDateBeginStr = dateGetTimeBegin.DateTime.ToString("yyyy-MM-dd");
                string getDateEndStr   = dateGetTimeEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");

                string smNoStr    = DataTypeConvert.GetString(searchLookUpStnModule.EditValue) != "全部" ? DataTypeConvert.GetString(searchLookUpStnModule.EditValue) : "";
                string empNameStr = lookUpPrepared.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpPrepared.EditValue) : "";
                string commonStr  = textCommon.Text.Trim();

                dataSet_StnSummaryList.Tables[0].Clear();

                string querySqlStr = ssDAO.QueryStnSummaryList_SQL(getDateBeginStr, getDateEndStr, smNoStr, empNameStr, commonStr, false);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);

                gridBottomOrderHead.QueryGridData(ref dataSet_StnSummaryList, "StnSummaryList", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
            }
        }
Example #24
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, sender, true))
                {
                    return;
                }

                if (dateSettlementDateBegin.EditValue == null || dateSettlementDateEnd.EditValue == null)
                {
                    //MessageHandler.ShowMessageBox("结账日期不能为空,请设置后重新进行查询。");
                    MessageHandler.ShowMessageBox(tsmiJzrqbnwk.Text);
                    if (dateSettlementDateBegin.EditValue == null)
                    {
                        dateSettlementDateBegin.Focus();
                    }
                    else
                    {
                        dateSettlementDateEnd.Focus();
                    }
                    return;
                }
                string orderDateBeginStr = dateSettlementDateBegin.DateTime.ToString("yyyy-MM-dd");
                string orderDateEndStr   = dateSettlementDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");
                string payDateBeginStr   = "";
                string payDateEndStr     = "";
                if (checkPayDate.Checked)
                {
                    if (datePayDateBegin.EditValue == null || datePayDateEnd.EditValue == null)
                    {
                        //MessageHandler.ShowMessageBox("付款日期不能为空,请设置后重新进行查询。");
                        MessageHandler.ShowMessageBox(tsmiFkrqbnwk.Text);
                        if (datePayDateBegin.EditValue == null)
                        {
                            datePayDateBegin.Focus();
                        }
                        else
                        {
                            datePayDateEnd.Focus();
                        }
                        return;
                    }
                    payDateBeginStr = datePayDateBegin.DateTime.ToString("yyyy-MM-dd");
                    payDateEndStr   = datePayDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");
                }

                string bussinessBaseNoStr = DataTypeConvert.GetString(searchLookUpBussinessBaseNo.EditValue) != "全部" ? DataTypeConvert.GetString(searchLookUpBussinessBaseNo.EditValue) : "";
                string reqDepStr          = lookUpReqDep.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpReqDep.EditValue) : "";
                int    wStateInt          = CommonHandler.Get_WarehouseState_No(comboBoxWarehouseState.Text);
                int    creatorInt         = DataTypeConvert.GetInt(searchLookUpCreator.EditValue);
                string commonStr          = textCommon.Text.Trim();
                int    wwListAutoIdInt    = (checkwwListAutoId.Checked && spinwwListAutoId.Value > 0) ? DataTypeConvert.GetInt(spinwwListAutoId.Value) : 0;
                dataSet_Settlement.Tables[0].Clear();

                string querySqlStr = setDAO.QuerySettlementHead_SQL(orderDateBeginStr, orderDateEndStr, payDateBeginStr, payDateEndStr, reqDepStr, bussinessBaseNoStr, wStateInt, creatorInt, -1, commonStr, wwListAutoIdInt, false);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);

                gridBottomOrderHead.QueryGridData(ref dataSet_Settlement, "SettlementHead", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + tsmiCxan.Text, ex);
            }
        }
Example #25
0
        /// <summary>
        /// 查询按钮事件
        /// </summary>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, sender, true))
                {
                    return;
                }

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

                string planDateBeginStr = "";
                string planDateEndStr   = "";
                if (checkPlanDate.Checked)
                {
                    if (datePlanDateBegin.EditValue == null || datePlanDateEnd.EditValue == null)
                    {
                        MessageHandler.ShowMessageBox("计划到货日期不能为空,请设置后重新进行查询。");
                        if (datePlanDateBegin.EditValue == null)
                        {
                            datePlanDateBegin.Focus();
                        }
                        else
                        {
                            datePlanDateEnd.Focus();
                        }
                        return;
                    }
                    planDateBeginStr = datePlanDateBegin.DateTime.ToString("yyyy-MM-dd");
                    planDateEndStr   = datePlanDateEnd.DateTime.AddDays(1).ToString("yyyy-MM-dd");
                }

                string reqDepStr          = lookUpReqDep.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpReqDep.EditValue) : "";
                string purCategoryStr     = lookUpPurCategory.ItemIndex > 0 ? DataTypeConvert.GetString(lookUpPurCategory.EditValue) : "";
                string bussinessBaseNoStr = DataTypeConvert.GetString(searchLookUpBussinessBaseNo.EditValue) != "全部" ? DataTypeConvert.GetString(searchLookUpBussinessBaseNo.EditValue) : "";
                int    reqStateInt        = CommonHandler.Get_OrderState_No(comboBoxReqState.Text);
                string projectNoStr       = searchLookUpProjectNo.Text != "全部" ? DataTypeConvert.GetString(searchLookUpProjectNo.EditValue) : "";
                //string codeFileNameStr = searchLookUpCodeFileName.Text != "全部" ? DataTypeConvert.GetString(searchLookUpCodeFileName.EditValue) : "";
                int    codeIdInt           = DataTypeConvert.GetInt(searchLookUpCodeFileName.EditValue);
                string commonStr           = textCommon.Text.Trim();
                int    delayWarehousingInt = -1;
                if (checkDelayWarehousing.CheckState == CheckState.Checked)
                {
                    delayWarehousingInt = 1;
                }
                else if (checkDelayWarehousing.CheckState == CheckState.Unchecked)
                {
                    delayWarehousingInt = 0;
                }
                dataSet_Order.Tables[0].Clear();

                string querySqlStr = orderDAO.Query_OrderList_ArrivalQuery_SQL(orderDateBeginStr, orderDateEndStr, planDateBeginStr, planDateEndStr, reqDepStr, purCategoryStr, bussinessBaseNoStr, reqStateInt, projectNoStr, codeIdInt, commonStr, delayWarehousingInt);
                lastQuerySqlStr = querySqlStr;
                string countSqlStr = commonDAO.QuerySqlTranTotalCountSql(querySqlStr);
                gridBottomOrderHead.QueryGridData(ref dataSet_Order, "OrderList", querySqlStr, countSqlStr, true);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--查询按钮事件错误。", ex);
            }
        }