public List<view_RequisitionDisbursementStatus> getReqDisbStatus(String empID, int num1, int num2)
        {
            RequisitionEnt reqDisbStatus = new RequisitionEnt();

            var reqDisInfo = reqDisbStatus.getRequisitionDisbursementStatus(empID, num1, num2);

            return reqDisInfo.ToList<view_RequisitionDisbursementStatus>();
        }
        public void bundleSelectedRequisition(List<Requisition> lstReqNo, string reqFrmNo, string empID, string deptID, List<Requisition> lstRej)
        {
            var q = from lr in lstReqNo
                    join rd in ContextDB.Requisition_Detail on lr.Req_Form_No equals rd.Req_Form_No
                    join s in ContextDB.Stationary_Catalogue on rd.Item_Code equals s.Item_Code
                    group rd by new { rd.Item_Code, s.Description } into g
                    select new Requisition_Detail
                    {
                        //Req_Form_No = g.Key.Req_Form_No,
                        Item_Code = g.Key.Item_Code,
                        Description = g.Key.Description,
                        Qty = g.Sum(rd => rd.Qty)
                    };

            RequisitionEnt reqE = new RequisitionEnt();
            Requisition req = new Requisition();
            req.Req_Form_No = reqFrmNo;
            req.Emp_ID = empID;
            req.Approval_Status = 3;
            req.Approval_Date = DateTime.Now;
            req.Approval_By = null;
            req.Req_Status = false;
            req.Notification = false;
            req.Prior = false;

            reqE.createRequisition(req);

            foreach (var val in q)
            {
                Requisition_Detail rd = new Requisition_Detail();
                rd.Req_Form_No = reqFrmNo;
                rd.Item_Code = val.Item_Code;
                rd.Description = val.Description;
                rd.Qty = val.Qty;

                RequisitionDetailEnt rdE = new RequisitionDetailEnt();
                rdE.createReqDetail(rd);

            }

            foreach (var val in lstReqNo)
            {
                Requisition reqt = (Requisition)val;
                reqt.Approval_Status = 2;

                updateRequisition(reqt);

            }
            foreach (var val in lstRej)
            {
                Requisition reqt = (Requisition)val;
                reqt.Approval_Status = 0;

                updateRequisition(reqt);

            }
        }
 public void updateRejectedRequisition(Requisition req)
 {
     RequisitionEnt reqEnt = new RequisitionEnt();
     reqEnt.updateRequisition( req);
 }
 public void submitRequisition(Requisition req)
 {
     RequisitionEnt reqEnt = new RequisitionEnt();
     reqEnt.createRequisition(req);
 }
 public view_RequisitionDisbursementStatus getReqDate(string fNo)
 {
     RequisitionEnt reqEnt = new RequisitionEnt();
     return reqEnt.getReqStatusByFrmNo(fNo);
 }