protected void Page_Load(object sender, EventArgs e)
 {
     rfc = new RequisitionFulfillmentController();
     if (!Page.IsPostBack)
     {
         retrievalGridview_Master.DataSource = rfc.actionGetAllRequisitionFulfillmentsForMaster();
         retrievalGridview_Master.DataBind();
     }
 }
        public void getJSONByRetrievalDetail(HttpContext context)
        {
            int stationeryId = Convert.ToInt32(context.Request.Form["stationeryId"]);

            List<MRetrievalFormDetails_View> mList = new List<MRetrievalFormDetails_View>();
            List<RetrievalFormDetails_View> list = new RequisitionFulfillmentController().actionGetAllRequisitionFulfillmentsForDetails(stationeryId);

            foreach (RetrievalFormDetails_View i in list)
            {
                mList.Add(new MRetrievalFormDetails_View(i.id,i.department_name,(int)i.Needed,(int)i.Actual,i.stationery));
            }

            context.Response.Write(JsonConvert.SerializeObject(mList));
            context.Response.End();
        }
        public void getJSONByRetrievalMaster(HttpContext context)
        {
            List<MRetrievelFormMaster_View> mList = new List<MRetrievelFormMaster_View>();
            List<RetrievelFormMaster_View> list = new RequisitionFulfillmentController().actionGetAllRequisitionFulfillmentsForMaster();

            foreach (RetrievelFormMaster_View i in list)
            {
                mList.Add(new MRetrievelFormMaster_View(i.id,i.stationery_name,(int)i.Needed,(int)i.Retrieved));
            }

            context.Response.Write(JsonConvert.SerializeObject(mList));
            context.Response.End();
        }