Ejemplo n.º 1
0
        public VMESSPJobCardDetail GetJobCardEmpDetail(int?id, VMLoggedUser LoggedInUser)
        {    //Gets the Specific JobCard flow id
            Expression <Func <VAT_JobCardFlow, bool> > SpecificEntries = c => c.JobCardAppID == id;
            List <VAT_JobCardFlow> vatJobCardFlows = VATJobCardAppFlowReporsitory.FindBy(SpecificEntries);
            //Gets the Specific Jobcard Application id whose Detail is to shown.
            Expression <Func <VEP_JobCardApplication, bool> > SpecificEntries2 = c => c.PJobCardAppID == id;
            VEP_JobCardApplication dbVEP_JobCard = VEPJobCardApplicationReporsitory.FindBy(SpecificEntries2).First();
            //View Model of the Job card Application to show Specific job card's Data in the View.
            VMESSPJobCardDetail vmesspJobCardDetail = new VMESSPJobCardDetail();

            vmesspJobCardDetail.DBVATjobcardflow = vatJobCardFlows.ToList();
            vmesspJobCardDetail.EmployeeName     = dbVEP_JobCard.EmployeeName;
            vmesspJobCardDetail.DesignationName  = dbVEP_JobCard.DesignationName;
            vmesspJobCardDetail.JobCardName      = dbVEP_JobCard.JobCardName;
            vmesspJobCardDetail.JobCardStageName = dbVEP_JobCard.JobCardStageName;
            vmesspJobCardDetail.DateCreated      = dbVEP_JobCard.DateCreated;
            vmesspJobCardDetail.DateStarted      = dbVEP_JobCard.DateStarted;
            vmesspJobCardDetail.DateEnded        = dbVEP_JobCard.DateEnded;
            vmesspJobCardDetail.TimeEnd          = dbVEP_JobCard.TimeEnd;
            vmesspJobCardDetail.TimeStart        = dbVEP_JobCard.TimeStart;
            vmesspJobCardDetail.Minutes          = dbVEP_JobCard.Minutes;
            vmesspJobCardDetail.Remarks          = dbVEP_JobCard.Remarks;
            vmesspJobCardDetail.LMName           = LoggedInUser.LMEmployeeName;

            return(vmesspJobCardDetail);
        }
Ejemplo n.º 2
0
        public ActionResult Delete(JobCardApp obj)
        {
            VMLoggedUser LoggedInUser = Session["LoggedInUser"] as VMLoggedUser;
            Expression <Func <VEP_JobCardApplication, bool> > SpecificEntries2 = c => (c.PJobCardAppID == obj.PJobCardAppID);
            VEP_JobCardApplication vpjca = VEPJobCardApplicationService.GetIndexSpecific(SpecificEntries2).First();

            JobCardESSPService.PostDelete(obj);
            // Disable Notifications
            int notiTypeID1 = Convert.ToInt32(NotificationTypeJCEnum.JCPending);
            Expression <Func <Notification, bool> > SpecificEntries = c => (c.EmployeeID == LoggedInUser.UserEmpID && c.Status == true && (c.NotificationTypeID == notiTypeID1) && c.PID == vpjca.PJobCardAppID);

            DDService.DeleteNotification(SpecificEntries);
            ToasterMessages.Add("Job card Deleted successfully !");
            Session["ToasterMessages"] = ToasterMessages;
            return(Json("OK", JsonRequestBehavior.AllowGet));
        }