public static YummyViewModel GetFeaturedYummyItem() { InquiryService inquiryService = new InquiryService(); var yummies = inquiryService.GetYummies(); return(yummies.First()); }
public void GetByCustomerID_ReturnsInquiryView_IfIDIsCorrect() { var inquiryService = new InquiryService(GetContextWithData()); var result = inquiryService.GetByCustomerID(1); Assert.AreEqual(result.Result.CustomerID, 1); }
public void GetByCustomerID_ReturnsNull_IfIDIsIncorrect() { var inquiryService = new InquiryService(GetContextWithData()); var result = inquiryService.GetByCustomerID(11); Assert.IsNull(result.Result); }
public void GetByEmail_ReturnsNull_IfEmailIsIncorrect() { string email = "wrong email"; var inquiryService = new InquiryService(GetContextWithData()); var result = inquiryService.GetByEmail(email); Assert.IsNull(result.Result); }
public void GetByEmail_ReturnsInquiryView_IfEmailIsCorrect() { string email = "*****@*****.**"; var inquiryService = new InquiryService(GetContextWithData()); var result = inquiryService.GetByEmail(email); Assert.AreEqual(result.Result.Email, email); }
public AcademicsController(InfrastructureService infraService, StudentService studentService, InquiryService inquiryService, InstitutionService institutionService, FeeService feeService, StudentProgramService studentprogramService) { this._infraService = infraService; this._studentService = studentService; this._inquiryService = inquiryService; this._institutionService = institutionService; this._feeService = feeService; this._studentprogramService = studentprogramService; }
private void grvwPendingApproval_DoubleClick(object sender, EventArgs e) { string inqNo = grvwPendingApproval.GetFocusedDataRow()["InquiryNumber"].ToString(); lblInqNo.Text = inqNo.Trim(); InquiryService inquiry = new InquiryService(); inquiry = inquiry.searchInquiry(inqNo); if (inquiry != null) { DataTable dtInqStatusTemp = InfoPCMS.db.executeSelectQuery("SELECT * FROM InquiryStatusTemp WHERE InquiryNumber = '" + inqNo.Trim() + "' "); lblInqNo.Text = inqNo.Trim(); lblInqType.Text = inquiry.ProblemNature.ToString().Trim(); lblInqDate.Text = inquiry.InquiryDate.ToString().Trim(); lblInqCus.Text = grvwPendingApproval.GetFocusedDataRow()["CustomerName"].ToString(); lblInqLoc.Text = inquiry.Location.ToString().Trim(); lblInqTaken.Text = grvwPendingApproval.GetFocusedDataRow()["inquirytaken"].ToString(); lblInqForBy.Text = grvwPendingApproval.GetFocusedDataRow()["siteresponsible"].ToString(); lblInqJobAssignedTo.Text = grvwPendingApproval.GetFocusedDataRow()["JobAssignedTo"].ToString(); if (dtInqStatusTemp.Rows.Count > 0) { lblInqForTo.Text = GetEmpName(dtInqStatusTemp.Rows[0]["ForwardUser"].ToString()); lblInqNoOfFor.Text = dtInqStatusTemp.Rows[0]["NoOfForwards"].ToString(); lblInqRemarks.Text = dtInqStatusTemp.Rows[0]["Remarks"].ToString(); } tabPendingApprove.SelectedTabPage = xtraTabPage2; xtraTabPage1.PageEnabled = false; xtraTabPage2.PageEnabled = true; xtraTabPage3.PageEnabled = false; btnApprove.Enabled = true; //btnViewDetails.Enabled = false; } }
private void grdVwPendingAppDateChange_DoubleClick(object sender, EventArgs e) { string inqNo = grdVwPendingAppDateChange.GetFocusedDataRow()["InquiryNumber"].ToString(); DataTable dt1 = InfoPCMS.db.executeSelectQuery(" SELECT T0.*,(SELECT CustomerName FROM HayleysPowerEngineeringCRM.dbo.Customer WHERE Id = T0.Customer)AS CustomerName, " + " (SELECT EmployeeName FROM HayleysPowerEngineeringCRM.dbo.Employee WHERE Id = T0.RequestedBy)AS EmployeeName " + " FROM HayleysPowerEngineeringCRM.dbo.InqChangeCompDateTemp T0 " + " WHERE T0.InquiryNumber = '" + inqNo + "'"); InquiryService inquiry = new InquiryService(); inquiry = inquiry.searchInquiry(inqNo); if (inquiry != null) { string[] acDate = inquiry.InquiryDate.ToString().Trim().Split(' '); string[] dueDate = grdVwPendingAppDateChange.GetFocusedDataRow()["dueDate"].ToString().Split(' '); string[] ReqDate = grdVwPendingAppDateChange.GetFocusedDataRow()["ReqCompDate"].ToString().Split(' '); lblChangeInqNo.Text = inqNo.Trim(); lblChangeType.Text = inquiry.ProblemNature.ToString().Trim(); lblChangeActDate.Text = acDate[0]; lblChangeActTime.Text = inquiry.InquiryTime.ToString().Trim(); lblChangeCus.Text = dt1.Rows[0]["CustomerName"].ToString(); lblChangeLoc.Text = inquiry.Location; lblChangeDueDate.Text = dueDate[0]; lblChangeDueTime.Text = grdVwPendingAppDateChange.GetFocusedDataRow()["dueTime"].ToString(); lblChangeReqDate.Text = ReqDate[0]; lblChangeReqTime.Text = grdVwPendingAppDateChange.GetFocusedDataRow()["ReqCompTime"].ToString(); lblChangeReqBy.Text = grdVwPendingAppDateChange.GetFocusedDataRow()["EmployeeName"].ToString(); lblChangeReqTime.Text = grdVwPendingAppDateChange.GetFocusedDataRow()["ReqCompTime"].ToString(); lblChangeRemark.Text = grdVwPendingAppDateChange.GetFocusedDataRow()["Remarks"].ToString(); tabPendingApprove.SelectedTabPage = xtraTabPage3; xtraTabPage1.PageEnabled = false; xtraTabPage2.PageEnabled = false; xtraTabPage3.PageEnabled = true; btnApprove.Enabled = true; //btnViewDetails.Enabled = false; } }
private void HandleLoadedCommand(object parameter) { this.Inquiries = InquiryService.GetMainInquiriesInfo(); }
public InquiryController(InquiryService inquiryService) { this.inquiryService = inquiryService; }