private void btnQuickPrint_Click(object sender, EventArgs e) { frmLicence objLic = new frmLicence(); objLic.Show(); this.Hide(); }
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 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); } }