public List <BDMAppointmentServerFilter> GetAllAppointmentDetails(BDMAppoinmentDetailGetDetailDTO objAppointmentDetail) { List <BDMAppointmentServerFilter> appoinment = new List <BDMAppointmentServerFilter>(); using (DbLayer dbLayer = new DbLayer()) { if (objAppointmentDetail.Position == 1) { SqlCommand SqlCmd = new SqlCommand("spCEOSelectBDMAppoinmentDetail"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@Position", objAppointmentDetail.Position); if (objAppointmentDetail.FromDate.Year != 1) { SqlCmd.Parameters.AddWithValue("@FromDate", objAppointmentDetail.FromDate); if (objAppointmentDetail.ToDate.Year != 1) { SqlCmd.Parameters.AddWithValue("@ToDate", objAppointmentDetail.ToDate); } } else { SqlCmd.Parameters.AddWithValue("@FromDate", DateTime.Now.AddDays(-30)); SqlCmd.Parameters.AddWithValue("@ToDate", DateTime.Now); } SqlCmd.Parameters.AddWithValue("@ActionBy", objAppointmentDetail.ActionBy); appoinment = dbLayer.GetEntityList <BDMAppointmentServerFilter>(SqlCmd); } else { SqlCommand SqlCmd1 = new SqlCommand("spSelectBDMAppoinmentDetail"); SqlCmd1.CommandType = CommandType.StoredProcedure; SqlCmd1.Parameters.AddWithValue("@ActionBy", objAppointmentDetail.ActionBy); if (objAppointmentDetail.FromDate.Year != 1) { SqlCmd1.Parameters.AddWithValue("@FromDate", objAppointmentDetail.FromDate); if (objAppointmentDetail.ToDate.Year != 1) { SqlCmd1.Parameters.AddWithValue("@ToDate", objAppointmentDetail.ToDate); } } else { SqlCmd1.Parameters.AddWithValue("@FromDate", DateTime.Now.AddDays(-30)); SqlCmd1.Parameters.AddWithValue("@ToDate", DateTime.Now); } appoinment = dbLayer.GetEntityList <BDMAppointmentServerFilter>(SqlCmd1); } } return(appoinment); }
// Home Page Grid public List <TargetGetAllChart> GetAllTargetCumulitive(TargetGetChart objTarget) { List <TargetGetAllChart> target = new List <TargetGetAllChart>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spGoalDetailsByRoot"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@EmployeeId", objTarget.EmployeeId); if (objTarget.FromDate.Year != 1) { SqlCmd.Parameters.AddWithValue("@FromDate", objTarget.FromDate); if (objTarget.ToDate.Year != 1) { SqlCmd.Parameters.AddWithValue("@ToDate", objTarget.ToDate); } } else { SqlCmd.Parameters.AddWithValue("@FromDate", DateTime.Now.AddDays(-90)); SqlCmd.Parameters.AddWithValue("@ToDate", DateTime.Now); } target = dbLayer.GetEntityList <TargetGetAllChart>(SqlCmd); } return(target); }
public GetAllBranchManpowerList GetAllBranchManpower(GetAllBranch objBranch) { GetAllBranchManpowerList getAllDetails = new GetAllBranchManpowerList(); List <GetBranchList> branch = new List <GetBranchList>(); List <GetManpowerList> manpower = new List <GetManpowerList>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectManpowerAttendanceByCustomer"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@CustomerId", objBranch.CustomerId); SqlCmd.Parameters.AddWithValue("@ActionBy", objBranch.ActionBy); branch = dbLayer.GetEntityList <GetBranchList>(SqlCmd); getAllDetails.BranchList = branch; } using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectManpowerAttendanceByManpower"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@CustomerId", objBranch.CustomerId); SqlCmd.Parameters.AddWithValue("@ActionBy", objBranch.ActionBy); manpower = dbLayer.GetEntityList <GetManpowerList>(SqlCmd); getAllDetails.ManpowerList = manpower; } return(getAllDetails); }
public List <BDMAppoinmentDetailByStatus> GetAllStatusCoordinator(GetStatus objAppointmentDetail) { List <BDMAppoinmentDetailByStatus> appoinment = new List <BDMAppoinmentDetailByStatus>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectHotandWarm"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@ActionBy", objAppointmentDetail.ActionBy); if (objAppointmentDetail.FromDate.Year != 1 && objAppointmentDetail.ToDate.Year != 1) { SqlCmd.Parameters.AddWithValue("@FromDate", objAppointmentDetail.FromDate); SqlCmd.Parameters.AddWithValue("@ToDate", objAppointmentDetail.ToDate); } else { var fr = DateTime.Now.AddDays(-30); var en = DateTime.Now; SqlCmd.Parameters.AddWithValue("@FromDate", fr); SqlCmd.Parameters.AddWithValue("@ToDate", en); } appoinment = dbLayer.GetEntityList <BDMAppoinmentDetailByStatus>(SqlCmd); } return(appoinment); }
public List <EmployeeAttendanceDTO> GetAllEmployeeAttendance() { List <EmployeeAttendanceDTO> contract = new List <EmployeeAttendanceDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand(""); SqlCmd.CommandType = CommandType.StoredProcedure; contract = dbLayer.GetEntityList <EmployeeAttendanceDTO>(SqlCmd); } return(contract); }
public List <AccountTypeGetDTO> GetAllAccountTypeList() { List <AccountTypeGetDTO> accounttype = new List <AccountTypeGetDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("[dbo].[spGetAllAccountType]"); SqlCmd.CommandType = CommandType.StoredProcedure; accounttype = dbLayer.GetEntityList <AccountTypeGetDTO>(SqlCmd); } return(accounttype); }
public List <BankNameListGetDTO> GetAllBankNameList() { List <BankNameListGetDTO> manPower = new List <BankNameListGetDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("[dbo].[spGetAllBankNameList]"); SqlCmd.CommandType = CommandType.StoredProcedure; manPower = dbLayer.GetEntityList <BankNameListGetDTO>(SqlCmd); } return(manPower); }
public List <GetAllPayment> GetAllManPayment() { List <GetAllPayment> manPower = new List <GetAllPayment>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("sp_SelectPayment"); SqlCmd.CommandType = CommandType.StoredProcedure; manPower = dbLayer.GetEntityList <GetAllPayment>(SqlCmd); } return(manPower); }
//-----Get Data----//-- public List <TargetGetAllDTO> GetAllTargets(TargetGetDTO objTarget) { List <TargetGetAllDTO> target = new List <TargetGetAllDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectTarget"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@ActionBy", objTarget.ActionBy); target = dbLayer.GetEntityList <TargetGetAllDTO>(SqlCmd); } return(target); }
//-----Get Data Employee----//-- public List <TargetDTO> GetAllEmployee(TargetGetDTO objTarget) { List <TargetDTO> target = new List <TargetDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectEmployeebyReportTo"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@EmployeeId", objTarget.EmployeeId); target = dbLayer.GetEntityList <TargetDTO>(SqlCmd); } return(target); }
// New Gird public List <TargetGetAllChart> GetAllTargetCumulitiveStacked(TargetGetChart objTarget) { List <TargetGetAllChart> target = new List <TargetGetAllChart>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("SELECT * FROM "); SqlCmd.CommandType = CommandType.StoredProcedure; target = dbLayer.GetEntityList <TargetGetAllChart>(SqlCmd); } return(target); }
public List <LeaveMasterDTO> GetAllLeaveMaster(LeaveMasterGetDTO objLeave) { List <LeaveMasterDTO> Leave = new List <LeaveMasterDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectLeaveMaster"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@ActionBy", objLeave.ActionBy); Leave = dbLayer.GetEntityList <LeaveMasterDTO>(SqlCmd); } return(Leave); }
public BDMAppointmentReportDTO GetAppointmentReportById(BDMAppointmentReportDTO objAppointmentReport) { BDMAppointmentReportDTO appoinment = new BDMAppointmentReportDTO(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectBDMAppoinmentReport"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@Id", objAppointmentReport.Id); appoinment = dbLayer.GetEntityList <BDMAppointmentReportDTO>(SqlCmd).FirstOrDefault(); } return(appoinment); }
public List <StatusMasterDTO> GetAllStatus(StatusMasterGetDTO objGetStatus) { List <StatusMasterDTO> status = new List <StatusMasterDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectStatus"); SqlCmd.Parameters.AddWithValue("@ActionBy", objGetStatus.ActionBy); SqlCmd.CommandType = CommandType.StoredProcedure; status = dbLayer.GetEntityList <StatusMasterDTO>(SqlCmd); } return(status); }
public List <GetAllManpowerDTO> GetAllManPowerMaster(GetManpowerDTO objGetMaster) { List <GetAllManpowerDTO> manPower = new List <GetAllManpowerDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectManPower"); SqlCmd.Parameters.AddWithValue("@ActionBy", objGetMaster.ActionBy); SqlCmd.CommandType = CommandType.StoredProcedure; manPower = dbLayer.GetEntityList <GetAllManpowerDTO>(SqlCmd); } return(manPower); }
public List <ServiceMasterDTO> GetAllServices(ServiceMasterGetDTO objGetServices) { List <ServiceMasterDTO> requirement = new List <ServiceMasterDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectServices"); SqlCmd.Parameters.AddWithValue("@ActionBy", objGetServices.ActionBy); SqlCmd.CommandType = CommandType.StoredProcedure; requirement = dbLayer.GetEntityList <ServiceMasterDTO>(SqlCmd); } return(requirement); }
//-----Get Data----//-- public List <RequirementDetailsDTO> GetAllRequirementDetails(RequirementDetailsGetDTO objRquirement) { List <RequirementDetailsDTO> requirement = new List <RequirementDetailsDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectRequirementDetails"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@ActionBy", objRquirement.ActionBy); requirement = dbLayer.GetEntityList <RequirementDetailsDTO>(SqlCmd); } return(requirement); }
public List <FieldOfficerCustomerAllDTO> GetAllCustomer(FieldOfficerCustomerDTO objCustomer) { List <FieldOfficerCustomerAllDTO> customer = new List <FieldOfficerCustomerAllDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spAssignFieldOfficer"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@ActionBy", objCustomer.ActionBy); customer = dbLayer.GetEntityList <FieldOfficerCustomerAllDTO>(SqlCmd); } return(customer); }
//#region get Manpower bank details //public bool GetManpowerBankDetails(ManpowerBankDetailsGetDTO objBankDetails) //{ // bool res = false; // SqlCommand SqlCmd = new SqlCommand("[dbo].[spGetManpowerBankDetails]"); // SqlCmd.CommandType = CommandType.StoredProcedure; // SqlCmd.Parameters.AddWithValue("@ManpowerId", objBankDetails.ManpowerId); // int result = DbLayer.ExecuteNonQuery(SqlCmd); // if (result != Int32.MaxValue) // { // res = true; // } // return res; //} public List <ManpowerBankDetailsGetDTO> GetManpowerBankDetails(ManpowerBankDetailsGetDTO objBankDetails) { List <ManpowerBankDetailsGetDTO> bank = new List <ManpowerBankDetailsGetDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spGetManpowerBankDetails"); SqlCmd.Parameters.AddWithValue("@ManpowerId", objBankDetails.ManpowerId); SqlCmd.CommandType = CommandType.StoredProcedure; bank = dbLayer.GetEntityList <ManpowerBankDetailsGetDTO>(SqlCmd); } return(bank); }
public GetAgeCalculationDTO GetAgeCalculation(GetAgeDTO objGetAge) { GetAgeCalculationDTO age = new GetAgeCalculationDTO(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spAgeCalculation"); SqlCmd.Parameters.AddWithValue("@dob", objGetAge.DateofBirth); SqlCmd.CommandType = CommandType.StoredProcedure; age = dbLayer.GetEntityList <GetAgeCalculationDTO>(SqlCmd).FirstOrDefault(); } return(age); }
//--Get by Inactive Data-- public List <CompetitorsDTO> GetInActiveCompetitors(CompetitorsGetDTO objCompetitors) { List <CompetitorsDTO> InActiveList = new List <CompetitorsDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectCompetitors"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@ActionBy", objCompetitors.ActionBy); InActiveList = dbLayer.GetEntityList <CompetitorsDTO>(SqlCmd); } return(InActiveList); }
public List <AssignManpowerDTO> GetContractByAllCustomer(GetContractByAllCustomer objCustomer) { List <AssignManpowerDTO> manpower = new List <AssignManpowerDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectContractByAllCustomer"); SqlCmd.Parameters.AddWithValue("@ActionBy", objCustomer.ActionBy); SqlCmd.CommandType = CommandType.StoredProcedure; manpower = dbLayer.GetEntityList <AssignManpowerDTO>(SqlCmd); } return(manpower); }
public List <FieldOfficerAllDTO> GetAllEmpList(FieldOfficerDTO objEmpList) { List <FieldOfficerAllDTO> empList = new List <FieldOfficerAllDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectFieldOfficer"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@ActionBy", objEmpList.ActionBy); empList = dbLayer.GetEntityList <FieldOfficerAllDTO>(SqlCmd); } return(empList); }
public List <ManpowerCustomerAllDTO> GetAllCustomer(ManpowerCustomerDTO objCustomer) { List <ManpowerCustomerAllDTO> site = new List <ManpowerCustomerAllDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spCreateOperation"); SqlCmd.Parameters.AddWithValue("@ActionBy", objCustomer.ActionBy); SqlCmd.CommandType = CommandType.StoredProcedure; site = dbLayer.GetEntityList <ManpowerCustomerAllDTO>(SqlCmd); } return(site); }
public List <getAllCustomerDTO> GetAllCustomer(getCustomerDTO objCustomer) { List <getAllCustomerDTO> site = new List <getAllCustomerDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSiteMappingCustomer"); SqlCmd.Parameters.AddWithValue("@ActionBy", objCustomer.ActionBy); SqlCmd.CommandType = CommandType.StoredProcedure; site = dbLayer.GetEntityList <getAllCustomerDTO>(SqlCmd); } return(site); }
public List <ProofMasterGetDTO> GetProofMaster(GetManpowerDTO objGetProof) { List <ProofMasterGetDTO> proof = new List <ProofMasterGetDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectProofMaster"); SqlCmd.Parameters.AddWithValue("@ActionBy", objGetProof.ActionBy); SqlCmd.CommandType = CommandType.StoredProcedure; proof = dbLayer.GetEntityList <ProofMasterGetDTO>(SqlCmd); } return(proof); }
public List <ManpowerStatusAllDTO> GetAllStatus(ManpowerStatusDTO objBranch) { List <ManpowerStatusAllDTO> site = new List <ManpowerStatusAllDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectAttendanceStatusMaster"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@ActionBy", objBranch.ActionBy); site = dbLayer.GetEntityList <ManpowerStatusAllDTO>(SqlCmd); } return(site); }
public List <ShiftMappingDTO> GetAllShiftByContract(ShiftMappingGetDTO objGetShiftMapping) { List <ShiftMappingDTO> ShiftMapping = new List <ShiftMappingDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spselectShiftByContract"); SqlCmd.Parameters.AddWithValue("@ContractId", objGetShiftMapping.ContractId); SqlCmd.CommandType = CommandType.StoredProcedure; ShiftMapping = dbLayer.GetEntityList <ShiftMappingDTO>(SqlCmd); } return(ShiftMapping); }
public List<getAllDesignationByDepartment> GetAllDesignation(getDesignationByDepartment des) { List<getAllDesignationByDepartment> desList = new List<getAllDesignationByDepartment>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("SpSalaryAllocationByEmployeeType"); SqlCmd.Parameters.AddWithValue("@DepartmentId", des.DepartmentId); SqlCmd.Parameters.AddWithValue("@ActionBy", des.ActionBy); SqlCmd.CommandType = CommandType.StoredProcedure; desList = dbLayer.GetEntityList<getAllDesignationByDepartment>(SqlCmd); } return desList; }
public List <ShiftMappingDTO> GetAllCustomerShiftMapping(ShiftMappingGetDTO objGetAllCustomer) { List <ShiftMappingDTO> ShiftMapping = new List <ShiftMappingDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectAllCustomer"); SqlCmd.Parameters.AddWithValue("@ActionBy", objGetAllCustomer.ActionBy); SqlCmd.CommandType = CommandType.StoredProcedure; ShiftMapping = dbLayer.GetEntityList <ShiftMappingDTO>(SqlCmd); } return(ShiftMapping); }