public void actionUpdateToDisbursement(int req_dept, int stationery)
        {
            FulfillmentController fc = new FulfillmentController();

            rf = fc.actionGetFulfillmentByDepartmentAndStationery(req_dept, stationery);

            // -------------- Disbursement Table Process ----------
            disbursement = actionGetDisbursementByDepartmentAndTodayDate(req_dept);

            if (disbursement == null)
            {
                actionCreateDisbursementTable(req_dept, getDeptRept(req_dept));
            }

            disbursementId = actionGetDisbursementIdByDepartmentAndDate(req_dept, disbursement.distributed_date);


            // -------------- Disbursement Detail Table Process ----------
            disbursementDetail = actionGetDisbursementDetailByDepartmentAndStationery(stationery);

            if (disbursementDetail == null)
            {
                actionCreateDisbursementDetailTable();
            }
            else
            {
                actionUpdateDisbursementDetailTable();
            }

            // -------------- Update Stationery Process ----------
            new StationeryController().actionUpdateQty(rf.stationery, rf.fulfill_quantity);

            // -------------- Update StockTransaction Process ----------
            new StockTransactionController().actionCreateStockTransaction(stationery, new StationeryController().actionGetQtyInStock(stationery),
                                                                          "Disbursement", "- " + rf.fulfill_quantity.ToString());

            // -------------- Remaining Requisition Fulfillment Process ----------
            unfulfillQty = rf.requested_quantity - rf.fulfill_quantity;
            if (unfulfillQty == 0)
            {
                fc.actionDeleteFulfillmentByObject(rf);
            }
            else
            {
                fc.actionUpdateFulfillmentByObject(rf, unfulfillQty);
            }

            // -------------- Update Requisition Status Process ----------
            new RequisitionController().actionRequisitionStatusChangeToDistributedByDepartment(stationery, req_dept);
        }
        public void actionUpdateToDisbursement(int req_dept, int stationery)
        {
            FulfillmentController fc = new FulfillmentController();

            rf=fc.actionGetFulfillmentByDepartmentAndStationery(req_dept, stationery);

            // -------------- Disbursement Table Process ----------
            disbursement = actionGetDisbursementByDepartmentAndTodayDate(req_dept);

            if (disbursement == null)
                actionCreateDisbursementTable(req_dept, getDeptRept(req_dept));

            disbursementId=actionGetDisbursementIdByDepartmentAndDate(req_dept, disbursement.distributed_date);

            // -------------- Disbursement Detail Table Process ----------
            disbursementDetail = actionGetDisbursementDetailByDepartmentAndStationery(stationery);

            if (disbursementDetail == null)
                actionCreateDisbursementDetailTable();
            else
                actionUpdateDisbursementDetailTable();

            // -------------- Update Stationery Process ----------
            new StationeryController().actionUpdateQty(rf.stationery, rf.fulfill_quantity);

            // -------------- Update StockTransaction Process ----------
            new StockTransactionController().actionCreateStockTransaction(stationery, new StationeryController().actionGetQtyInStock(stationery),
                "Disbursement", "- "+rf.fulfill_quantity.ToString());

            // -------------- Remaining Requisition Fulfillment Process ----------
            unfulfillQty = rf.requested_quantity - rf.fulfill_quantity;
            if (unfulfillQty == 0)
                fc.actionDeleteFulfillmentByObject(rf);
            else
                fc.actionUpdateFulfillmentByObject(rf, unfulfillQty);

            // -------------- Update Requisition Status Process ----------
            new RequisitionController().actionRequisitionStatusChangeToDistributedByDepartment(stationery, req_dept);
        }