public string rejectRequisition(string accessToken, int reqId, string reason)
 {
     System.Diagnostics.Debug.WriteLine("inside rejectRequisition: accessToken" + accessToken + " ,reqId:" + reqId + "  ,reason:" + reason);
     try
     {
         OAuthController oAuth = new OAuthController();
         User user = oAuth.actionGetUserByToken(accessToken);
         //get userId
         RequisitionController requisitionController = new RequisitionController();
         //  requisitionController.actionRequisitionStatusChangeToRejected(reqId);
         requisitionController.actionRequisitionStatusChangeToRejectedWithRemarkAndRejectedBy(reqId, reason, user.id);
         return "success";
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine("Exception occured in rejectRequisition.." + e.Message);
         return "fail";
     }
 }
        public static void rejectRequisitions(List<RequisitionID> jsonParam, string reason)
        {
            System.Diagnostics.Debug.WriteLine("REASON FOR REJECTION:" + reason);
            User sUser = (User)HttpContext.Current.Session["user"];
            if (sUser == null)
            {
                return;
            }

            JavaScriptSerializer js = new JavaScriptSerializer();
            // System.Diagnostics.Debug.WriteLine("check @@@@@@@@@@@@ approveRequisitions:" + js.Serialize(jsonParam));
            //  System.Diagnostics.Debug.WriteLine("check @@@@@@@@@@@@ approveRequisitions:" + jsonParam.Count());

            //actionRequisitionStatusChangeToApproved(int requisition_id)
            RequisitionController requisitionController = new RequisitionController();

            foreach (RequisitionID requisitionId in jsonParam)
            {
                // System.Diagnostics.Debug.WriteLine("check @@@@@@@@@@@@ param:" + requisitionId.Id);
                // requisitionController.actionRequisitionStatusChangeToRejected(Convert.ToInt32(requisitionId.Id));
                requisitionController.actionRequisitionStatusChangeToRejectedWithRemarkAndRejectedBy(Convert.ToInt32(requisitionId.Id), reason, sUser.id);
            }
        }