Exemple #1
0
        /// <summary>
        /// 保存到二级库存使用表中
        /// </summary>
        /// <param name="ListOrdSecondAyrlnvUseModel"></param>
        private void SaveOrdSecondAyrlnvUseModelList(List <OrdSecondAyrlnvUseModel> ListOrdSecondAyrlnvUseModel)
        {
            if (ListOrdSecondAyrlnvUseModel.Count == 0)
            {
                return;
            }

            try
            {
                OrdSecondAyrlnvUseBLL.GetInstance().SaveOrdSecondAyplnvModel(ListOrdSecondAyrlnvUseModel, CurrentUser);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        /// <summary>
        /// 到货事件操作 1、修改明细表中状态 到货数量、入库批次 2、做采购单 订单 备货 到货流程
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnReceive_Click(object sender, EventArgs e)
        {
            string strError = string.Empty;

            if (!Validata(out strError))
            {
                XtraMessageBox.Show(strError, Constant.MsgTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            //提示信息
            //if (XtraMessageBox.Show("确认是否作到货操作?", Constant.MsgTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
            //    return;

            try
            {
                //0、添加到采购供应目录中
                AddHitComm();

                //1、修改明细表中状态 到货数量、入库批次
                ListOrdInvoiceFromItemModel = GetListOrdInvoiceFromItemModel();

                OrdInvoiceBLL.GetInstance().ModifyOrdInvoiceFromItemState(ListOrdInvoiceFromItemModel, StrInvoiceFromId, "2", CurrentUser);

                //2、走发货流程
                ListOrdSecondAyrlnvUseModel = GetListOrdSecondAyrlnvUseModelToAudi();

                OrdSecondAyrlnvUseBLL.GetInstance().OrdInvoiceFrom(ListOrdSecondAyrlnvUseModel, ordPurchaseModel, ordOrderModel, CurrentUser);

                //刷新数据
                DataBind(StrInvoiceFromId);
                DataBind_SendList();

                XtraMessageBox.Show("到货操作成功!", Constant.MsgTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);

                //刷新标头显示数据
                IniData(StrInvoiceFromId);

                EditFlag = true;//设置已修改状态
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show("到货操作失败!", Constant.MsgTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Exemple #3
0
        /// <summary>
        /// 删除事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDel_Click(object sender, EventArgs e)
        {
            if (ConsumeCommDt.DefaultView.Count == 0)
            {
                return;
            }

            string strError = string.Empty;

            if (!Validate_Del(out strError))
            {
                XtraMessageBox.Show(strError, Constant.MsgTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            //提示信息
            if (XtraMessageBox.Show("确认删除消耗商品信息吗?", Constant.MsgTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
            {
                return;
            }

            ListOrdSecondAyrlnvUseModel = GetListOrdSecondAyrlnvUseModelByToDel();

            if (ListOrdSecondAyrlnvUseModel.Count == 0)
            {
                return;
            }

            try
            {
                OrdSecondAyrlnvUseBLL.GetInstance().ModifyOrdSecondAyplnvUseState(ListOrdSecondAyrlnvUseModel, "0", CurrentUser);

                //刷新消耗商品列表数据集
                DataBindConsume();

                XtraMessageBox.Show("消耗商品信息删除成功!", Constant.MsgTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show("消耗商品信息删除失败!", Constant.MsgTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Exemple #4
0
        /// <summary>
        /// 审核通过事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAudi_Click(object sender, EventArgs e)
        {
            if (ConsumeCommDt.DefaultView.Count == 0)
            {
                return;
            }

            string strError = string.Empty;

            if (!Validate_Audi(out strError))
            {
                XtraMessageBox.Show(strError, Constant.MsgTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            //获取二级库存使用单对象列表
            ListOrdSecondAyrlnvUseModel = GetListOrdSecondAyrlnvUseModelToAudi();

            if (ListOrdSecondAyrlnvUseModel.Count == 0)
            {
                return;
            }

            try
            {
                //备货流程
                OrdSecondAyrlnvUseBLL.GetInstance().OrdInvoiceFrom(ListOrdSecondAyrlnvUseModel, ordPurchaseModel, ordOrderModel, CurrentUser);

                //更改审核状态
                OrdSecondAyrlnvUseBLL.GetInstance().ModifyOrdSecondAyplnvUseState(ListOrdSecondAyrlnvUseModel, "2", CurrentUser);

                //刷新数据集
                DataBindConsume();

                XtraMessageBox.Show("二级库存使用审核通过!", Constant.MsgTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show("二级库存使用审核通过失败!", Constant.MsgTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }