private void office1_Click(object sender, EventArgs e) { if (this.itemClick != null) { this.itemClick(true); } OfficeItem list = sender as OfficeItem; string oficeId = list.lblOfficeId.Text; string ofice = list.lblOffice.Text; //douyaming 2016-05-05 CASE:24356 if (ofice.Contains("妇") || ofice.Contains("产")) { if (SkyComm.eCardAuthorizationData.Tables[0].Rows.Count > 0 && SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["SEX"].ToString() != "女") { MyAlert frmAlter = new MyAlert(AlertTypeenum.信息, "当前性别【" + SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["SEX"].ToString() + "】不能进行【" + ofice + "】就诊!"); frmAlter.ShowDialog(); return; } } //wangchao 2016.10.27 case:25866 if (ofice.Contains("儿")) { if (SkyComm.eCardAuthorizationData.Tables[0].Rows.Count > 0 && SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["AGEUNIT"].ToString().Contains("岁")) { string ageString = SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["AGE"].ToString().Trim(); if (ageString != "" && Convert.ToInt32(ageString) > 18) { MyAlert frmAlter = new MyAlert(AlertTypeenum.信息, "当前患者年龄超过18岁,不允许就诊【" + ofice + "】!"); frmAlter.ShowDialog(); return; } } } string mOfficeMessage = ""; mOfficeMessage = SkyComm.getvalue(oficeId); if (!string.IsNullOrEmpty(mOfficeMessage)) { SkyComm.ShowMessageInfo(mOfficeMessage); } FrmDoctorChoose frm = new FrmDoctorChoose(); frm.officeId = oficeId; frm.office = ofice; frm.ShowDialog(this); frm.Dispose(); if (this.itemClick != null) { this.itemClick(false); } }
private void office1_Click(object sender, EventArgs e) { if (this.itemClick != null) { this.itemClick(true); } OfficeItem list = sender as OfficeItem; string oficeId = list.lblOfficeId.Text; string ofice = list.lblOffice.Text; try { string[] officename = SkyComm.getvalue("科室挂号开始时间").Split('|'); for (int i = 0; i < officename.Length; i++) { if (ofice == officename[i].Split('/')[0].ToString()) { DateTime Hourset = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd") + " " + officename[i].Split('/')[1].ToString());//拼接凑成正确时间格式 DateTime Hournow = new CommonFacade().GetServerDateTime(); if (Hournow < Hourset) { MyAlert frm1 = new MyAlert(AlertTypeenum.信息, "未到放号时间,暂时不能挂号!"); frm1.ShowDialog(); return; } } } } catch (Exception ex) { MyAlert frm1 = new MyAlert(AlertTypeenum.信息, "科室挂号开始时间配置有误,请检查!"); frm1.ShowDialog(); return; } //douyaming 2016-05-05 CASE:24356 if (ofice.Contains("妇") || ofice.Contains("产")) { if (SkyComm.eCardAuthorizationData.Tables[0].Rows.Count > 0 && SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["SEX"].ToString() != "女") { MyAlert frmAlter = new MyAlert(AlertTypeenum.信息, "当前性别【" + SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["SEX"].ToString() + "】不能进行【" + ofice + "】就诊!"); frmAlter.ShowDialog(); return; } } //wangchao 2016.10.27 case:25866 if (ofice.Contains("儿")) { if (SkyComm.eCardAuthorizationData.Tables[0].Rows.Count > 0 && SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["AGEUNIT"].ToString().Contains("岁")) { string ageString = SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["AGE"].ToString().Trim(); if (ageString != "" && Convert.ToInt32(ageString) > 18) { MyAlert frmAlter = new MyAlert(AlertTypeenum.信息, "当前患者年龄超过18岁,不允许就诊【" + ofice + "】!"); frmAlter.ShowDialog(); return; } } } string mOfficeMessage = ""; mOfficeMessage = SkyComm.getvalue(oficeId); if (!string.IsNullOrEmpty(mOfficeMessage)) { SkyComm.ShowMessageInfo(mOfficeMessage); } FrmDoctorChoose frm = new FrmDoctorChoose(); frm.officeId = oficeId; frm.office = ofice; frm.ShowDialog(this); frm.Dispose(); if (this.itemClick != null) { this.itemClick(false); } }