Ejemplo n.º 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            if (Convert.ToDecimal(lbStock.Text) == 0)
            {
                MessageDialog.ShowPromptMessage("没有库存数,请确认零件!");
                return;
            }

            if (Convert.ToDecimal(lbStock.Text) < numCount.Value)
            {
                MessageDialog.ShowPromptMessage("挂账数量超出库存数量");
                return;
            }

            DataTable dtTemp = (DataTable)dataGridView1.DataSource;

            for (int i = 0; i < dtTemp.Rows.Count; i++)
            {
                if (Convert.ToInt32(txtGoodsCode.Tag) == Convert.ToInt32(dtTemp.Rows[i]["GoodsID"]) &&
                    txtGoodsName.Tag.ToString() == dtTemp.Rows[i]["账务库房ID"].ToString())
                {
                    MessageDialog.ShowPromptMessage("不能录入重复物品");
                    return;
                }
            }

            if (IntegrativeQuery.IsInnerStorage(txtReceiving.Tag.ToString()) &&
                txtGoodsName.Tag.ToString() != txtReceiving.Tag.ToString())
            {
                MessageDialog.ShowPromptMessage("物品明细中有物品的账务库房与入库库房不符");
                return;
            }

            DataRow dr = dtTemp.NewRow();

            dr["图号型号"]    = txtGoodsCode.Text;
            dr["物品名称"]    = txtGoodsName.Text;
            dr["规格"]      = txtSpec.Text;
            dr["账务库房"]    = UniversalFunction.GetStorageName(txtGoodsName.Tag.ToString());
            dr["挂账数量"]    = numCount.Value;
            dr["备注"]      = txtListRemark.Text;
            dr["GoodsID"] = txtGoodsCode.Tag;
            dr["账务库房ID"]  = txtGoodsName.Tag;

            dtTemp.Rows.Add(dr);

            dataGridView1.DataSource = dtTemp;
        }
Ejemplo n.º 2
0
        private void btnExcConfirmor_Click(object sender, EventArgs e)
        {
            if (lbBillStatus.Text != "等待收货")
            {
                MessageDialog.ShowPromptMessage("请重新确认单据状态");
                return;
            }

            if (SubmitData())
            {
                m_billMessageServer.PassFlowMessage(m_lnqManeuverBill.Bill_ID,
                                                    string.Format("{0}号调运单已收货,请收货方入库", m_lnqManeuverBill.Bill_ID),
                                                    BillFlowMessage_ReceivedUserType.用户,
                                                    IntegrativeQuery.GetStorageOrStationPrincipal(m_lnqManeuverBill.InStorageID));
                MessageDialog.ShowPromptMessage("收货成功");
                this.Close();
            }
        }
Ejemplo n.º 3
0
        private void btnReceiving_Click(object sender, EventArgs e)
        {
            if (lbBillStatus.Text != "等待入库")
            {
                MessageDialog.ShowPromptMessage("请重新确认单据状态");
                return;
            }

            if (SubmitData())
            {
                MessageDialog.ShowPromptMessage("入库成功");


                m_billMessageServer.EndFlowMessage(m_lnqManeuverBill.Bill_ID,
                                                   string.Format("{0}号调运单收货方已入库", m_lnqManeuverBill.Bill_ID), null,
                                                   IntegrativeQuery.GetStorageOrStationPrincipal(m_lnqManeuverBill.OutStorageID));

                this.Close();
            }
        }
Ejemplo n.º 4
0
        private void btnAuditing_Click(object sender, EventArgs e)
        {
            if (lbBillStatus.Text != "等待主管审核")
            {
                MessageDialog.ShowPromptMessage("请重新确认单据状态");
                return;
            }

            if (SubmitData())
            {
                MessageDialog.ShowPromptMessage("审核成功");

                m_billMessageServer.PassFlowMessage(m_lnqManeuverBill.Bill_ID,
                                                    string.Format("{0}号调运单已审核,请发货方出库", m_lnqManeuverBill.Bill_ID),
                                                    BillFlowMessage_ReceivedUserType.用户,
                                                    IntegrativeQuery.GetStorageOrStationPrincipal(m_lnqManeuverBill.OutStorageID));

                this.Close();
            }
        }
        public 唯一标识码录入窗体(Out_ManeuverList maneuverList, bool IsOperation)
        {
            InitializeComponent();

            m_lnqManeuverList = maneuverList;

            if (!IsOperation)
            {
                btnAdd.Visible    = false;
                btnDelete.Visible = false;
                btnSubmit.Visible = false;
            }

            dataGridView1.DataSource = m_serverIdentifier.GetInfo(m_lnqManeuverList.Bill_ID, m_lnqManeuverList.GoodsID, m_lnqManeuverList.StorageID);

            F_GoodsPlanCost lnqGoodsInfo = IntegrativeQuery.QueryGoodsInfo(m_lnqManeuverList.GoodsID);

            txtGoodsCode.Text      = lnqGoodsInfo.GoodsCode;
            txtGoodsName.Text      = lnqGoodsInfo.GoodsName;
            txtSpec.Text           = lnqGoodsInfo.Spec;
            txtOperationCount.Text = m_lnqManeuverList.ShipperCount.ToString();
        }
Ejemplo n.º 6
0
        private void dataGridView1_CellEnter(object sender, DataGridViewCellEventArgs e)
        {
            if (dataGridView1.CurrentRow == null)
            {
                return;
            }
            else
            {
                txtGoodsCode.Tag   = dataGridView1.CurrentRow.Cells["GoodsID"].Value.ToString();
                txtGoodsCode.Text  = dataGridView1.CurrentRow.Cells["图号型号"].Value.ToString();
                txtGoodsName.Text  = dataGridView1.CurrentRow.Cells["物品名称"].Value.ToString();
                txtGoodsName.Tag   = dataGridView1.CurrentRow.Cells["账务库房ID"].Value.ToString();
                txtSpec.Text       = dataGridView1.CurrentRow.Cells["规格"].Value.ToString();
                numCount.Value     = Convert.ToDecimal(dataGridView1.CurrentRow.Cells["挂账数量"].Value);
                lbUnit.Text        = dataGridView1.CurrentRow.Cells["单位"].Value.ToString();
                txtListRemark.Text = dataGridView1.CurrentRow.Cells["备注"].Value.ToString();

                Out_Stock lnqStock = IntegrativeQuery.QuerySecStock(Convert.ToInt32(txtGoodsCode.Tag), txtReceiving.Tag.ToString(), txtGoodsName.Tag.ToString());

                lbStock.Text = Convert.ToDecimal(lnqStock == null ? 0 : lnqStock.StockQty).ToString();
            }
        }
        private void dataGridView1_CellEnter(object sender, DataGridViewCellEventArgs e)
        {
            if (dataGridView1.CurrentRow == null)
            {
                return;
            }
            else
            {
                numApplyCount.Maximum = 10000000000;

                txtGoodsCode.Tag       = dataGridView1.CurrentRow.Cells["物品ID"].Value.ToString();
                txtGoodsCode.Text      = dataGridView1.CurrentRow.Cells["图号型号"].Value.ToString();
                txtGoodsName.Text      = dataGridView1.CurrentRow.Cells["物品名称"].Value.ToString();
                txtGoodsName.Tag       = dataGridView1.CurrentRow.Cells["账务库房ID"].Value.ToString();
                txtSpec.Text           = dataGridView1.CurrentRow.Cells["规格"].Value.ToString();
                numApplyCount.Value    = Convert.ToDecimal(dataGridView1.CurrentRow.Cells["申请数量"].Value);
                numAuditingCount.Value = Convert.ToDecimal(dataGridView1.CurrentRow.Cells["审核数量"].Value);
                lbUnit.Text            = dataGridView1.CurrentRow.Cells["单位"].Value.ToString();
                txtListRemark.Text     = dataGridView1.CurrentRow.Cells["备注"].Value.ToString();

                Out_Stock lnqStock = IntegrativeQuery.QuerySecStock(Convert.ToInt32(txtGoodsCode.Tag),
                                                                    txtShipments.Tag.ToString(), txtGoodsName.Tag.ToString());

                if (lnqStock == null)
                {
                    numApplyCount.Maximum = 0;
                }
                else
                {
                    numApplyCount.Maximum = Convert.ToDecimal(lnqStock.StockQty);
                }


                lbStock.Text = numApplyCount.Maximum.ToString();
            }
        }
Ejemplo n.º 8
0
        public 调运单明细(string billID, AuthorityFlag authFlag)
        {
            InitializeComponent();


            FaceAuthoritySetting.SetEnable(this.Controls, authFlag);
            FaceAuthoritySetting.SetVisibly(this.toolStrip, authFlag);
            this.toolStrip.Visible = true;

            if (billID == "")
            {
                txtBill_ID.Text   = "系统自动生成";
                lbBillStatus.Text = "新建单据";
            }
            else
            {
                m_lnqManeuverBill = m_serverManeuver.GetBillInfo(billID);

                txtBill_ID.Text         = m_lnqManeuverBill.Bill_ID;
                lbBillStatus.Text       = m_lnqManeuverBill.BillStatus;
                txtReceiving.Tag        = m_lnqManeuverBill.InStorageID;
                txtShipments.Tag        = m_lnqManeuverBill.OutStorageID;
                txtReceiving.Text       = UniversalFunction.GetStorageName(m_lnqManeuverBill.InStorageID);
                txtShipments.Text       = UniversalFunction.GetStorageName(m_lnqManeuverBill.OutStorageID);
                txtBillRemark.Text      = m_lnqManeuverBill.Remark;
                txtLogisticsBillNo.Text = m_lnqManeuverBill.LogisticsBillNo;
                txtLogisticsName.Text   = m_lnqManeuverBill.LogisticsName;
                txtPhone.Text           = m_lnqManeuverBill.Phone;
                txtScrapBillNo.Text     = m_lnqManeuverBill.ScrapBillNo;

                btnReceiving.Visible =
                    IntegrativeQuery.IsStockPrincipal(txtReceiving.Tag.ToString(), BasicInfo.LoginName);
                btnShipments.Visible =
                    IntegrativeQuery.IsStockPrincipal(txtShipments.Tag.ToString(), BasicInfo.LoginName);

                if (IntegrativeQuery.IsSalesStorage(m_lnqManeuverBill.InStorageID))
                {
                    btnReceiving.Visible = false;
                }
            }

            switch (lbBillStatus.Text)
            {
            case "新建单据":

                numProposerCount.ReadOnly = false;
                btnAdd.Visible            = true;
                btnModify.Visible         = true;
                btnDelete.Visible         = true;
                break;

            case "等待主管审核":

                numProposerCount.ReadOnly = false;

                break;

            case "等待出库":

                numShipperCount.ReadOnly = false;
                btnModify.Visible        = true;
                txtGoodsCode.Enabled     = false;

                break;

            case "等待入库":

                numConfirmorCount.ReadOnly = false;
                btnModify.Visible          = true;
                txtGoodsCode.Enabled       = false;

                break;

            default:
                break;
            }

            dataGridView1.DataSource = m_serverManeuver.GetListInfo(billID);
            dataGridView1.Columns["物品ID"].Visible    = false;
            dataGridView1.Columns["Bill_ID"].Visible = false;
        }