public List <CompanyHolidayDTO> GetAllCompanyHoliday(CompanyHolidayGetDTO objLeave) { List <CompanyHolidayDTO> Leave = new List <CompanyHolidayDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectCompanyHoliday"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@ActionBy", objLeave.ActionBy); Leave = dbLayer.GetEntityList <CompanyHolidayDTO>(SqlCmd); } return(Leave); }
public List <LeaveFrequencyMasterDTO> GetAllLeaveFrequencyMaster(LeaveFrequencyMasterGetDTO objLeave) { List <LeaveFrequencyMasterDTO> Leave = new List <LeaveFrequencyMasterDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectLeaveFrequency"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@ActionBy", objLeave.ActionBy); Leave = dbLayer.GetEntityList <LeaveFrequencyMasterDTO>(SqlCmd); } return(Leave); }
public List <getAllEmployeeTypeDTO> GetAllEmployeetype(getEmployeeTypeDTO objLeave) { List <getAllEmployeeTypeDTO> empList = new List <getAllEmployeeTypeDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectEmployeeType"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@ActionBy", objLeave.ActionBy); empList = dbLayer.GetEntityList <getAllEmployeeTypeDTO>(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 <SalaryCompensateDTO> GetAllSalaryCompensate(SalaryCompensateGetDTO objSalary) { List <SalaryCompensateDTO> salary = new List <SalaryCompensateDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectSalaryComponent"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@ActionBy", objSalary.ActionBy); salary = dbLayer.GetEntityList <SalaryCompensateDTO>(SqlCmd); } return(salary); }
public List <ClientLeadChangeDTO> GetClientList(GetClientbyEmployeeDTO objEmployee) { List <ClientLeadChangeDTO> clientlist = new List <ClientLeadChangeDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectUnSignedContract"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@EmployeeId", objEmployee.EmployeeId); clientlist = dbLayer.GetEntityList <ClientLeadChangeDTO>(SqlCmd); } return(clientlist); }
public List <GetEmployeeBankDetail> GetActiveEmployeeBankDetails(int id) { List <GetEmployeeBankDetail> activeList = new List <GetEmployeeBankDetail>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectEmployeeBank"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@EmployeeId", id); activeList = dbLayer.GetEntityList <GetEmployeeBankDetail>(SqlCmd); } return(activeList); }
public List <ContractMasterDTO> GetAllContractMasters(ContractMasterGetDTO objGetContract) { List <ContractMasterDTO> contract = new List <ContractMasterDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectContract"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@ActionBy", objGetContract.ActionBy); contract = dbLayer.GetEntityList <ContractMasterDTO>(SqlCmd); } return(contract); }
public List <EmployeeAccountsDTO> GetAllEmployeeAccounts(EmplyoeeAccountsGetDTO objGetAccount) { List <EmployeeAccountsDTO> accounts = new List <EmployeeAccountsDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectAccount"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@ActionBy", objGetAccount.ActionBy); accounts = dbLayer.GetEntityList <EmployeeAccountsDTO>(SqlCmd); } return(accounts); }
//only allowed for admin, need to annotate // GET: Posts/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } if (!DbLayer.CheckIfPostsExists((int)id)) { return(HttpNotFound()); } return(View(DbLayer.getPost((int)id))); }
/* * // GET: Admin/Create * public ActionResult Create() * { * return View(); * } * * // POST: Admin/Create * // To protect from overposting attacks, please enable the specific properties you want to bind to, for * // more details see https://go.microsoft.com/fwlink/?LinkId=317598. * [HttpPost] * [ValidateAntiForgeryToken] * public ActionResult Create([Bind(Include = "userID,userRole,phoneNumber,email")] User user) * { * if (ModelState.IsValid) * { * db.User.Add(user); * db.SaveChanges(); * return RedirectToAction("Index"); * } * * return View(user); * } */ // GET: Admin/Edit/5 //present the user modification information public ActionResult Edit(string userid) { if (userid == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } if (!DbLayer.CheckIAreaExists(area_id)) { return(HttpNotFound()); } return(View(DbLayer.getUser(userid))); }
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); }
//--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 EmployeeAttendanceDTO GetByEmployeeAttendanceId(long id) { EmployeeAttendanceDTO attendace = new EmployeeAttendanceDTO(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand(""); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@Id", id); attendace = dbLayer.GetEntityList <EmployeeAttendanceDTO>(SqlCmd).FirstOrDefault(); } return(attendace); }
public List <ShiftMasterDTO> GetAllShifts(ShiftGetDTO objGetShift) { List <ShiftMasterDTO> ShiftMaster = new List <ShiftMasterDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectShift"); SqlCmd.Parameters.AddWithValue("@ActionBy", objGetShift.ActionBy); SqlCmd.CommandType = CommandType.StoredProcedure; ShiftMaster = dbLayer.GetEntityList <ShiftMasterDTO>(SqlCmd); } return(ShiftMaster); }
public List <BDMAttachmentGetDTO> GetAllAttachmentById(BDMAttachmentGetDTO objAppointmentDetail) { List <BDMAttachmentGetDTO> appoinment = new List <BDMAttachmentGetDTO>(); using (DbLayer dbLayer = _unitOfWork.DbLayer) { SqlCommand SqlCmd = new SqlCommand("spSelectBDMAttachment"); SqlCmd.Parameters.AddWithValue("@AppoinmentId", objAppointmentDetail.AppoinmentId); SqlCmd.CommandType = CommandType.StoredProcedure; appoinment = dbLayer.GetEntityList <BDMAttachmentGetDTO>(SqlCmd); } return(appoinment); }
//need to think how to do this for other permutations of (area,locale) and (cat,subcat) // GET: List Posts public ActionResult Index(string area_id, string category_id, string Place, string Type) { //handle errors and edgecases if (area_id == null || category_id == null || Place == null || Type == null) { return(HttpNotFound()); } if (Place == "Area" && Type == "Category") { if (!DbLayer.CheckIfAreaExists(area_id) || !DbLayer.CheckIfCategoryExists(category_id)) { return(HttpNotFound()); } return(View(DbLayer.GetAllPosts(category_id, area_id))); } else if (Place == "Area" && Type == "SubCategory") { if (!DbLayer.CheckIfAreaExists(area_id) || !DbLayer.CheckIfSubCategoryExists(category_id)) { return(HttpNotFound()); } return(View(DbLayer.GetAllPosts(category_id, area_id, Place, Type))); } else if (Place == "Locale" && Type == "Category") { if (!DbLayer.CheckIfLocaleExists(area_id) || !DbLayer.CheckIfCategoryExists(category_id)) { return(HttpNotFound()); } return(View(DbLayer.GetAllPosts(category_id, area_id, Place, Type))); } else if (Place == "Locale" && Type == "SubCategory") { if (!DbLayer.CheckIfLocaleExists(area_id) || !DbLayer.CheckIfSubCategoryExists(category_id)) { return(HttpNotFound()); } return(View(DbLayer.GetAllPosts(category_id, area_id, Place, Type))); } return(HttpNotFound()); }
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); }
public List<getAllEmployeeByDesignation> GetAllEmployee(getEmployeeByDesignation des) { List<getAllEmployeeByDesignation> desList = new List<getAllEmployeeByDesignation>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("SpSalaryAllocationByEmployeeType"); SqlCmd.Parameters.AddWithValue("@EmployeeType", des.EmployeeType); SqlCmd.Parameters.AddWithValue("@DesignationId", des.DesignationId); SqlCmd.Parameters.AddWithValue("@ActionBy", des.ActionBy); SqlCmd.CommandType = CommandType.StoredProcedure; desList = dbLayer.GetEntityList<getAllEmployeeByDesignation>(SqlCmd); } return desList; }
public List <ServiceMasterDTO> GetInActiveServiceMaster(ServiceMasterGetDTO objInActive) { List <ServiceMasterDTO> inactiveList = new List <ServiceMasterDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectServices"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@Active", 0); SqlCmd.Parameters.AddWithValue("@ActionBy", objInActive.ActionBy); inactiveList = dbLayer.GetEntityList <ServiceMasterDTO>(SqlCmd); } return(inactiveList); }
public List<getAllSalaryAllocation> GetAllSalaryReport(getSalaryAllocation des) { List<getAllSalaryAllocation> desList = new List<getAllSalaryAllocation>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("SpSelectSalaryReport"); SqlCmd.Parameters.AddWithValue("@EmployeeId", (des.EmployeeId == 0) ? null : des.EmployeeId); SqlCmd.Parameters.AddWithValue("@ManpowerId", (des.ManpowerId == 0) ? null : des.ManpowerId); SqlCmd.Parameters.AddWithValue("@ActionBy", des.ActionBy); SqlCmd.CommandType = CommandType.StoredProcedure; desList = dbLayer.GetEntityList<getAllSalaryAllocation>(SqlCmd); } return desList; }
public List <ManpowerAttendanceBranchAllDTO> GetAllBranch(ManpowerAttendanceBranchDTO objBranch) { List <ManpowerAttendanceBranchAllDTO> branch = new List <ManpowerAttendanceBranchAllDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectAllocateManpower"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@CustomerId", objBranch.CustomerId); SqlCmd.Parameters.AddWithValue("@ActionBy", objBranch.ActionBy); branch = dbLayer.GetEntityList <ManpowerAttendanceBranchAllDTO>(SqlCmd); } return(branch); }
public ServiceMasterDTO GetServiceById(ServiceMasterGetDTO objGetServiceById) { ServiceMasterDTO requirement = new ServiceMasterDTO(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectServices"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@Id", objGetServiceById.Id); SqlCmd.Parameters.AddWithValue("@ActionBy", objGetServiceById.ActionBy); requirement = dbLayer.GetEntityList <ServiceMasterDTO>(SqlCmd).FirstOrDefault(); } return(requirement); }
//--Get by Inactive Data-- public List <RequirementDetailsDTO> GetInActiveRequirementDetails(RequirementDetailsGetDTO objRquirement) { List <RequirementDetailsDTO> InActiveList = new List <RequirementDetailsDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectRequirementDetails"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@Active", 0); SqlCmd.Parameters.AddWithValue("@ActionBy", objRquirement.ActionBy); InActiveList = dbLayer.GetEntityList <RequirementDetailsDTO>(SqlCmd); } return(InActiveList); }
//public DataSet AttendancePopup(AttendancePopup Popup) //{ // DataSet result; // SqlCommand SqlCmd = new SqlCommand("spAttendanceReport"); // SqlCmd.CommandType = CommandType.StoredProcedure; // SqlCmd.Parameters.AddWithValue("@ManpowerId", Popup.ManpowerId); // SqlCmd.Parameters.AddWithValue("@FromDate", Popup.FromDate); // SqlCmd.Parameters.AddWithValue("@ToDate", Popup.ToDate); // SqlCmd.Parameters.AddWithValue("@ActionBy", Popup.ActionBy); // result = _unitOfWork.fillDataSet(SqlCmd); // return result; //} public List <ManpowerAttendanceCustomerAllDTO> GetAllCustomer(ManpowerAttendanceCustomerDTO objCustomer) { List <ManpowerAttendanceCustomerAllDTO> customer = new List <ManpowerAttendanceCustomerAllDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectAllocateManpower"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@CompanyId", objCustomer.CompanyId); SqlCmd.Parameters.AddWithValue("@ActionBy", objCustomer.ActionBy); customer = dbLayer.GetEntityList <ManpowerAttendanceCustomerAllDTO>(SqlCmd); } return(customer); }
//--Get by Id Based Data public List <RequirementDetailsDTO> GetRequirementDetailsById(RequirementDetailsGetDTO objRquirement) { List <RequirementDetailsDTO> requirement = new List <RequirementDetailsDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectRequirementDetailsById"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@ClientId", objRquirement.ClientId); SqlCmd.Parameters.AddWithValue("@ActionBy", objRquirement.ActionBy); requirement = dbLayer.GetEntityList <RequirementDetailsDTO>(SqlCmd); } return(requirement); }
public List <getAllServiceByCustomerDTO> GetAllService(getServiceDTO objBranch) { List <getAllServiceByCustomerDTO> site = new List <getAllServiceByCustomerDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectContractByCustomer"); SqlCmd.Parameters.AddWithValue("@CustomerId", objBranch.CustomerId); SqlCmd.Parameters.AddWithValue("@ActionBy", objBranch.ActionBy); SqlCmd.CommandType = CommandType.StoredProcedure; site = dbLayer.GetEntityList <getAllServiceByCustomerDTO>(SqlCmd); } return(site); }
public List <getAllBranchByCustomerDTO> GetAllBranch(getBranchDTO objBranch) { List <getAllBranchByCustomerDTO> barnch = new List <getAllBranchByCustomerDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectBranch"); SqlCmd.Parameters.AddWithValue("@CustomerId", objBranch.CustomerId); SqlCmd.Parameters.AddWithValue("@ActionBy", objBranch.ActionBy); SqlCmd.CommandType = CommandType.StoredProcedure; barnch = dbLayer.GetEntityList <getAllBranchByCustomerDTO>(SqlCmd); } return(barnch); }
public List <FieldOfficerBranchAllDTO> GetAllBranch(FieldOfficerBranchDTO objBranch) { List <FieldOfficerBranchAllDTO> branch = new List <FieldOfficerBranchAllDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spAssignFieldOfficer"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@CustomerId", objBranch.CustomerId); SqlCmd.Parameters.AddWithValue("@ActionBy", objBranch.ActionBy); branch = dbLayer.GetEntityList <FieldOfficerBranchAllDTO>(SqlCmd); } return(branch); }
public List <AssignFieldOfficerDTO> GetAllAssignFieldOfficer(FieldOfficer objEmpList) { List <AssignFieldOfficerDTO> empList = new List <AssignFieldOfficerDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectFieldOfficerByCustomer"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@FieldOfficerId", objEmpList.EmployeeId); SqlCmd.Parameters.AddWithValue("@ActionBy", objEmpList.ActionBy); empList = dbLayer.GetEntityList <AssignFieldOfficerDTO>(SqlCmd); } return(empList); }