Example #1
0
 private void setValue(DataTable dts, UcTimeDetailItem lb, int index)
 {
     lb.lblOrder.Text             = dts.Rows[index]["QUEUEID"].ToString();
     lb.lblTime.Text              = dts.Rows[index]["DETAILTIME"].ToString();
     lb.arranageDetailSource.Text = dts.Rows[index]["SOURCE"].ToString();
 }
Example #2
0
        private void TimeDetailItem1_Click(object sender, EventArgs e)
        {
            UcTimeDetailItem doctor = sender as UcTimeDetailItem;
            string           order  = doctor.lblOrder.Text;
            string           time   = doctor.lblTime.Text;

            DataRow dr = BespeakDataset.Tables[0].Rows[0];

            dr["QUEUEID"] = order;
            DateTime dtCurrent = new CommonFacade().GetServerDateTime();

            //if (Convert.ToDateTime(time).TimeOfDay < dtCurrent.TimeOfDay)
            //{
            //    time = dtCurrent.AddMinutes(20).TimeOfDay.ToString();
            //}
            dr["BESPEAKDATE"] = Convert.ToDateTime(Convert.ToDateTime(dr["BESPEAKDATE"].ToString()).ToShortDateString() + " " + time);

            //Case #27421
            string mEndTime = "";

            foreach (DataRow row in DtTimeDetail.Rows)
            {
                mEndTime = row["DETAILTIME"].ToString();
            }

            DateTime mDateTime = Convert.ToDateTime(Convert.ToDateTime(dr["BESPEAKDATE"]).ToString("yyyy-MM-dd") + " " + mEndTime);

            if (Convert.ToDateTime(dr["BESPEAKDATE"]) > mDateTime)
            {
                dr["BESPEAKDATE"] = mDateTime;
            }
            dr["OPERATEDATE"] = dtCurrent;


            if (this.itemClick != null)
            {
                this.itemClick(true);
            }
            //预约前先刷卡
            if (string.IsNullOrEmpty(SkyComm.cardInfoStruct.CardNo))
            {
                FrmMain frmM      = new FrmMain();
                int     intResult = SkyComm.ReadCard("预约");
                if (intResult == 0)
                {
                    if (this.itemClick != null)
                    {
                        this.itemClick(false);
                    }
                    return;
                }
            }

            if (office.Contains("妇") || office.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() + "】不能进行【" + office + "】就诊!");
                    frmAlter.ShowDialog();
                    if (this.itemClick != null)
                    {
                        this.itemClick(false);
                    }
                    return;
                }
            }
            //wangchao 2016.10.27 case:25866
            if (office.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岁,不允许就诊【" + office + "】!");
                        frmAlter.ShowDialog();
                        if (this.itemClick != null)
                        {
                            this.itemClick(false);
                        }
                        return;
                    }
                }
            }

            FrmBespeakConfirm frm = new FrmBespeakConfirm();

            frm.BespeakDataset       = BespeakDataset;
            frm.arrangeSource        = arrangeSource;
            frm.arranageDetailSource = doctor.arranageDetailSource.Text;
            frm.ShowDialog(this);
            frm.Dispose();
            if (this.itemClick != null)
            {
                this.itemClick(false);
            }
        }
Example #3
0
 private void SetVisable(UcTimeDetailItem lb, bool isVisable)
 {
     lb.Visible = isVisable;
 }