private void btnSendDoc_Click(object sender, EventArgs e) { DisableBtnAll(); try { string result = new EmrClass.DocScan.SendToDocScanCls().Send(Program.CurrentRegis.tpr_id, "CD101", Program.CurrentSite.mhs_code, Program.CurrentUser.mut_username); lbAlertMsg.Text = result; //if (Program.CurrentUser.mut_type.ToString() == "D") //{ // if (docscan.SendtoDocscan("CD101", Program.CurrentRegis.tpr_id, Program.CurrentRegis.tpr_en_no, Program.getCurrentCareProvider)) // { // lbAlertMsg.Text = HistoryData.savestatus; // } // else // lbAlertMsg.Text = "Cannot send to docsan user authentication failed"; //} //else // lbAlertMsg.Text = "Cannot send to docscan"; } catch (Exception ex) { lbAlertMsg.Text = ex.Message; } if (this.FormStatus == formStatus.isFooter) { StatusFooter(); } else { StatusWK(); } }
private void btnSendToDocScan_Click(object sender, EventArgs e) { try { string rptCode = "PT102"; switch (cmbLang.SelectedIndex) { case 0: //ผลการตรวจมะเร็งปากมดลูก (EN) rptCode = "PT102"; break; case 1: //ผลการตรวจมะเร็งปากมดลูก (ARB) rptCode = "PT103"; break; case 2: //ผลการตรวจมะเร็งปากมดลูก (JAP) //rptCode = IsThai ? new List<string> { "PE701" } : new List<string> { "PE702" }; rptCode = "PT104"; break; default: rptCode = "PT102"; break; } string result = new EmrClass.DocScan.SendToDocScanCls().Send(Program.CurrentRegis.tpr_id, rptCode, Program.CurrentSite.mhs_code, Program.CurrentUser.mut_username); lblAlert.Text = result; //if (docscan.SendtoDocscan(rptCode, Program.CurrentRegis.tpr_id, Program.CurrentRegis.tpr_en_no, Program.getCurrentCareProvider)) //{ // lblAlert.Text = Class.HistoryData.savestatus; // Class.HistoryData.showform = 'Y'; // lblAlert.Text = "Send To Docscan Completed"; // return; //} //else //{ // lblAlert.Text = "Please Try Again."; //} } catch (Exception ex) { Program.MessageError(this.Name, "btnSendToDocScan_Click(object sender, EventArgs e)", ex, false); lblAlert.Text = "Please Try Again."; } }