private void txtCertificateSerialNumber_KeyDown(object sender, KeyEventArgs e) { try { if (e.KeyCode == Keys.Enter) { frmLicence quotObj = new frmLicence(); quotObj.CertificateNumber = txtCertificateSerialNumber.Text; var response = ICEcashService.LICCertConf(RiskDetailModel, ParternToken, txtCertificateSerialNumber.Text); if (response != null && response.Response.Message.Contains("Partner Token has expired")) { ObjToken = IcServiceobj.getToken(); ParternToken = ObjToken.Response.PartnerToken; Service_db.UpdateToken(ObjToken); response = ICEcashService.LICCertConf(RiskDetailModel, ParternToken, txtCertificateSerialNumber.Text); } MessageBox.Show(response.Response.Message); this.Close(); Form1 obj = new Form1(); obj.Show(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void GetVrnLicenseAndInsurace(string vrn) { vrn = "AAZ1001"; VehicleDetails vehicleDetails = GetVehicelDetials(vrn); if (vehicleDetails != null) { IcServiceobj = new ICEcashService(); ObjToken = IcServiceobj.getToken(); parternToken = ObjToken.Response.PartnerToken; } if (vehicleDetails != null && vehicleDetails.LicenseId != null) { ObjToken = IcServiceobj.getToken(); if (ObjToken != null) { parternToken = ObjToken.Response.PartnerToken; } ResultLicenceIDRootObject quoteresponseResult = IcServiceobj.LICResult(vehicleDetails.LicenseId, parternToken); if (quoteresponseResult.Response != null) { lblRegNum.Text = quoteresponseResult.Response.VRN; } } }
public WebCertificateSerial(RiskDetailModel objRiskDetail, string Partnertoken) { InitializeComponent(); RiskDetailModel = objRiskDetail; ParternToken = Partnertoken; IcServiceobj = new ICEcashService(); }
public CertificateSerialForm(RiskDetailModel objRiskDetail, string Partnertoken, string base64Data) { InitializeComponent(); this.ActiveControl = txtCertificateSerialNumber; txtCertificateSerialNumber.Focus(); RiskDetailModel = objRiskDetail; ParternToken = Partnertoken; IcServiceobj = new ICEcashService(); _base64Data = base64Data; }
public frmLicenceQuote() { ObjToken = new ICEcashTokenResponse(); IcServiceobj = new ICEcashService(); objfrmQuote = new frmQuote(); InitializeComponent(); this.Size = new System.Drawing.Size(1300, 720); PnlLicenceVrn.Visible = true; PnlLicenceVrn.Location = new Point(335, 100); PnlLicenceVrn.Size = new System.Drawing.Size(739, 238); }
private void txtCertificateSerialNumber_KeyDown(object sender, KeyEventArgs e) { try { if (e.KeyCode == Keys.Enter) { if (valatedSerialNumber(txtCertificateSerialNumber.Text)) { //else //{ // MessageBox.Show("Please Eneter the correct Serial Number", "Error"); //} frmLicence quotObj = new frmLicence(); quotObj.CertificateNumber = txtCertificateSerialNumber.Text; var response = ICEcashService.LICCertConf(RiskDetailModel, ParternToken, txtCertificateSerialNumber.Text); if (response != null && response.Response.Message.Contains("Partner Token has expired")) { ObjToken = IcServiceobj.getToken(); ParternToken = ObjToken.Response.PartnerToken; Service_db.UpdateToken(ObjToken); response = ICEcashService.LICCertConf(RiskDetailModel, ParternToken, txtCertificateSerialNumber.Text); } CertSerialNoDetailModel model = new CertSerialNoDetailModel(); model.VehicleId = RiskDetailModel.Id; model.CertSerialNo = txtCertificateSerialNumber.Text; SaveCertSerialNum(model); MessageBox.Show(response.Response.Message); this.Close(); Form1 obj = new Form1(); obj.Show(); } else { MessageBox.Show("Please Eneter the correct Serial Number", "Error"); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
//uncomment after getting response from icecash private List <ResultLicenceIDResponse> DisplayLicenseDisc(RiskDetailModel riskDetailModel, string parterToken) { // List<ResultLicenceIDResponse> list = new List<ResultLicenceIDResponse>(); // ResultLicenceIDRootObject quoteresponseResult = IcServiceobj.LICResult(riskDetailModel.LicenseId, parternToken); ResultLicenceIDRootObject quoteresponseResult = ICEcashService.TPILICResult(riskDetailModel, parternToken); //TPILICResult if (quoteresponseResult != null && (quoteresponseResult.Response.Message.Contains("Partner Token has expired") || quoteresponseResult.Response.Message.Contains("Invalid Partner Token"))) { ObjToken = IcServiceobj.getToken(); if (ObjToken != null) { parternToken = ObjToken.Response.PartnerToken; Service_db.UpdateToken(ObjToken); // quoteresponse = IcServiceobj.RequestQuote(parternToken, RegistrationNo, suminsured, make, model, PaymentTermId, VehicleYear, CoverTypeId, VehicleUsage, "", (CustomerModel)customerInfo); // uncomment this line quoteresponseResult = ICEcashService.TPILICResult(riskDetailModel, parternToken); } } if (quoteresponseResult != null && quoteresponseResult.Response != null) { licenseDiskList.Add(quoteresponseResult.Response); if (quoteresponseResult.Response.LicenceCert == null) { //MessageBox.Show("Pdf not found for this certificate."); MyMessageBox.ShowBox("Pdf not found for this certificate.", "Message"); pictureBox2.Visible = false; return(licenseDiskList); } this.Close(); CertificateSerialForm obj = new CertificateSerialForm(riskDetailModel, parternToken, quoteresponseResult.Response.LicenceCert); obj.Show(); } // return(licenseDiskList); }
public frmLicence() { ObjToken = new ICEcashTokenResponse(); IcServiceobj = new ICEcashService(); objfrmQuote = new frmQuote(""); InitializeComponent(); // //_branchId = branchId; //this.Size = new System.Drawing.Size(1300, 720); //PnlLicenceVrn.Visible = true; // 1572, 818 // PnlLicenceVrn.Location = new Point(335, 100); // PnlLicenceVrn.Size = new System.Drawing.Size(1300, 720); // PnlLicenceVrn.Size = new System.Drawing.Size(1300, 1200); //pnlPrintPreview.Visible = false; //pnlPrintPreview.Location = new Point(335, 50); //pnlPrintPreview.Size = new System.Drawing.Size(739, 800); }