Ejemplo n.º 1
0
    public void deleteOrderByPurchaseOrder(int purchaseorder, int userNo, string message)
    {
        string fromemail = StoreSupplierDAO.findEmployeeByCode(userNo).employeeemail;
        SOrder po        = StoreSupplierDAO.findUnapprovedOrderByPurchaseOrder(purchaseorder);
        string toemail   = po.Employee.employeeemail;

        try
        {
            StoreSupplierDAO.deleteOrderByPurchaseOrder(purchaseorder);
        }
        catch (Exception e)
        {
            throw new SSexception("delete order failed because order not found :" + e.Message);
        }
        sendMailToEmployee(String.Format("Order no. {0} has been rejected. Reason given: {1}", purchaseorder, message), fromemail, toemail);
    }
Ejemplo n.º 2
0
    public void deleteAdjustmentByVoucherNumber(int vouchernumber, int userNo, string message)
    {
        string            fromemail = StoreSupplierDAO.findEmployeeByCode(userNo).employeeemail;
        AdjustmentVoucher av        = StoreSupplierDAO.findUnapprovedAdjByVoucherNumber(vouchernumber);
        string            toemail   = av.Employee.employeeemail;

        try
        {
            StoreSupplierDAO.deleteAdjustmentByVoucherNumber(vouchernumber);
        }
        catch (Exception e)
        {
            throw new SSexception("delete adjustment voucher failed because adjustment voucher not found :" + e.Message);
        }
        sendMailToEmployee(String.Format("Order no. {0} has been rejected. Reason given: {1}", vouchernumber, message), fromemail, toemail);
    }