public LeaveApprovalServiceViewModel GetApprovalDetails(string ApproverID) { var serviceModel = new LeaveApprovalServiceViewModel { leaveApprovals = Mapper.Map <List <LeaveApprovalServiceModel> >(_leaveApprovalRepositary.GetApprovalDetails(ApproverID)) }; return(serviceModel); }
public LeaveApprovalServiceViewModel GetLeaveRequestForApproval(string ApproverId) { var serviceModel = new LeaveApprovalServiceViewModel { leaveApprovals = Mapper.Map <List <LeaveApprovalServiceModel> >(_leaveApprovalRepositary.GetLeaveApprovals(ApproverId)) }; return(serviceModel); }
public LeaveApprovalServiceViewModel GetMulitpleEmployeeDetails(string strleavereqid) { var serviceModel = new LeaveApprovalServiceViewModel { leaveApprovals = Mapper.Map <List <LeaveApprovalServiceModel> >(_leaveApprovalRepositary.GetMulitpleEmployeeDetails(strleavereqid)) }; return(serviceModel); }
//public string GetMappingData(string Leavecode) //{ // string qtytype = _leaveApprovalRepositary.GetMappingData(Leavecode).ToString(); // return qtytype; //} public Tuple <string, int> SaveLeaveApproval(LeaveApprovalServiceViewModel model) { Tuple <string, int> itemSaveData = _leaveApprovalRepositary.SaveAprrovedLeaveRequest(Mapper.Map <List <tbl_LeaveApproval> >(model.leaveApprovals.Select(Mapper.Map <LeaveApprovalServiceModel>))); var result = 1; if (itemSaveData.Item2 != -99) { result = 1; SMSData sms = new SMSData(); // var sms=_SMSUtility.SendSMS(model.leaveApprovals.FirstOrDefault(x=>x.ApproverMobNo.ToString())) return(itemSaveData); } else { result = 0; return(itemSaveData); } }