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);
        }
Пример #2
0
        // 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);
        }
Пример #3
0
        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);
        }
Пример #5
0
        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);
        }
Пример #6
0
        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);
        }
Пример #7
0
        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);
        }
Пример #8
0
        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);
        }
Пример #9
0
        //-----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);
        }
Пример #10
0
        //-----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);
        }
Пример #11
0
        // 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);
        }
Пример #12
0
        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);
        }
Пример #13
0
        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);
        }
Пример #14
0
        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);
        }
Пример #15
0
        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);
        }
Пример #18
0
        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);
        }
Пример #19
0
        //#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);
        }
Пример #20
0
        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);
        }
Пример #23
0
        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);
        }
Пример #26
0
        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);
        }
Пример #27
0
        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);
        }
Пример #28
0
        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);
        }
Пример #29
0
 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;
 }
Пример #30
0
        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);
        }