/// <summary> /// 单击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void office1_Click(object sender, EventArgs e) { if (this.itemClick != null) { this.itemClick(true); } OfficeItem list = sender as OfficeItem; string mLevelOneOficeName = list.lblOffice.Text; // FrmLevelTwoOfficeChooes mFrmLevelTwoOfficeChooes = new FrmLevelTwoOfficeChooes();//转向到二级科室选择界面 // // mFrmLevelTwoOfficeChooes.MLevelOneOficeName = mLevelOneOficeName; // // mFrmLevelTwoOfficeChooes.ShowDialog(); FrmOfficeChoose frmOfficeChoose = new FrmOfficeChoose(); frmOfficeChoose.MLevelOneOficeName = mLevelOneOficeName; frmOfficeChoose.ShowDialog(); 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; //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 SetVisable(OfficeItem lb, bool isVisable) { lb.Visible = isVisable; }
/// <summary> /// 设置一级科室名称 /// </summary> /// <param name="list"></param> /// <param name="lb"></param> /// <param name="index"></param> private void setOfficeName(List <string> list, OfficeItem lb, int index) { lb.lblOffice.Text = list[index] == null ? "无" : list[index]; }
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); } }
private void setValue(DataTable dts, OfficeItem lb, int index) { lb.lblOffice.Text = dts.Rows[index]["OFFICE"] == null ? "无" : dts.Rows[index]["OFFICE"].ToString(); lb.lblOfficeId.Text = dts.Rows[index]["OFFICEID"].ToString(); }