예제 #1
0
        private void lblOK_Click(object sender, EventArgs e)
        {
            bool isAll = false;

            for (int i = 0; i < this.gdvMain.RowCount; i++)
            {
                if ((Boolean)gdvMain.GetDataRow(i)["PITCHON1"])
                {
                    isAll = true;
                }
            }
            if (isAll)
            {
                #region
                CLINICMtQueueFacade queueFacade = new CLINICMtQueueFacade();
                CLINICMtQueueData   queue       = new CLINICMtQueueData();
                queue = queueFacade.GetByReserveID(tempeserveid);
                if (!string.IsNullOrEmpty(queue.Exitnooff))
                {
                    #region
                    reserveFacade = new CLINICMtReserveFacade();
                    DataSet ds = reserveFacade.ReserveRecipeToGroup(tempID, tempNO);
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        sourceGroupID   = ds.Tables[0].Rows[0]["GROUPID"].ToString();
                        sourceGroupName = ds.Tables[0].Rows[0]["GROUPNAME"].ToString();
                        sourceOfficeID  = ds.Tables[0].Rows[0]["OFFICEID"].ToString();
                    }
                    if (!SelectItem(sourceOfficeID))
                    {
                        ucTime1.timer1.Start();
                        return;
                    }

                    ucTime1.timer1.Stop();
                    using (FrmReserveInfo frm = new FrmReserveInfo())
                    {
                        frm.isupdatereserve = true;     //是否修改
                        frm.reserveOldTime  = tempTime; //预约时间
                        frm.streserveid     = tempeserveid;
                        frm.stregisterid    = tempregisterid;
                        frm.GroupID         = sourceGroupID;
                        frm.GroupName       = sourceGroupName;
                        frm.OfficeID        = sourceOfficeID;
                        frm.CostMoney       = string.Format("{0:0.00}", ReturnTotalMoney(sourceOfficeID));
                        frm.exOfficeName    = dtRecipe.Rows[0]["OFFICEID"].ToString();

                        if (dtRev.Rows.Count == 0)
                        {
                            SkyComm.ShowMessageInfo("请选择处方信息后再进行预约!");
                            ucTime1.timer1.Start();
                            return;
                        }
                        else
                        {
                            frm.dtRev      = dtRev;
                            frm.DiagnoseID = SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["DIAGNOSEID"].ToString();
                            if (frm.ShowDialog(this) == DialogResult.OK)
                            {
                                using (FrmReserveAlert frmAlert = new FrmReserveAlert())
                                {
                                    frmAlert.reserveDate = frm.reserveDateNew;
                                    frmAlert.GroupName   = sourceGroupName;
                                    frmAlert.queueNO     = frm.queueNO;
                                    frmAlert.CostMoney   = frm.CostMoney;
                                    frmAlert.queueNO     = frm.QueueID;
                                    frmAlert.ShowDialog();
                                }
                                for (int i = this.dtRecipe.Rows.Count - 1; i >= 0; i--)
                                {
                                    if ((Boolean)dtRecipe.Rows[i]["PITCHON1"])
                                    {
                                        dtRecipe.Rows.RemoveAt(i);
                                    }
                                }
                                //清空预约组信息
                                sourceGroupID   = "";
                                sourceGroupName = "";

                                SelectAllRecipe(false);
                                gdcMain.DataSource      = null;
                                this.gdcMain.DataSource = dtRecipe;

                                //
                                frm.Dispose();
                                if (dtRecipe.Rows.Count == 0)
                                {
                                    ucTime1.timer1.Stop();
                                    SkyComm.CloseWin(this);
                                }
                                SkyComm.GetCardBalance();
                                //  lblYE.Text = SkyComm.cardBlance.ToString();
                            }
                            else
                            {
                                ucTime1.timer1.Start();
                                return;
                            }
                        }
                    }
                    #endregion
                }
                else
                {
                    SkyComm.ShowMessageInfo("您好:当前预约数据需要去窗口进行改签,谢谢。");
                }
                #endregion
            }
            else
            {
                SkyComm.ShowMessageInfo("您好:请选择预约改签项目,谢谢。");
            }
        }
예제 #2
0
        private void lblOK_Click(object sender, EventArgs e)
        {
            try
            {
                decimal ye        = Convert.ToDecimal(this.lblYE.Text.Trim());
                decimal costMoney = Convert.ToDecimal(this.lblTotalMoney.Text.Trim());
                if (ye < costMoney)
                {
                    SkyComm.ShowMessageInfo("卡余额不足!");
                    ucTime1.timer1.Start();
                    return;
                }
            }
            catch
            { }
            ucTime1.timer1.Stop();
            using (FrmReserveInfo frm = new FrmReserveInfo())
            {
                frm.GroupID      = sourceGroupID;
                frm.GroupName    = sourceGroupName;
                frm.OfficeID     = OfficeID;
                frm.CostMoney    = this.lblTotalMoney.Text;
                frm.exOfficeName = dtRecipe.Rows[0]["OFFICE"].ToString();

                if (!SelectItem())
                {
                    ucTime1.timer1.Start();
                    return;
                }
                if (dtRev.Rows.Count == 0)
                {
                    SkyComm.ShowMessageInfo("请选择处方信息后再进行预约!");
                    ucTime1.timer1.Start();
                    return;
                }
                else
                {
                    frm.dtRev      = dtRev;
                    frm.DiagnoseID = SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["DIAGNOSEID"].ToString();
                    if (frm.ShowDialog(this) == DialogResult.OK)
                    {
                        using (FrmReserveAlert frmAlert = new FrmReserveAlert())
                        {
                            frmAlert.reserveDate = frm.reserveDateNew;
                            frmAlert.GroupName   = sourceGroupName;
                            frmAlert.queueNO     = frm.queueNO;
                            frmAlert.CostMoney   = frm.CostMoney;
                            frmAlert.ShowDialog();
                        }
                        for (int i = this.dtRecipe.Rows.Count - 1; i >= 0; i--)
                        {
                            if ((Boolean)dtRecipe.Rows[i]["PITCHON1"])
                            {
                                dtRecipe.Rows.RemoveAt(i);
                            }
                        }
                        //清空预约组信息
                        sourceGroupID   = "";
                        sourceGroupName = "";

                        SelectAllRecipe(false);
                        gdcMain.DataSource      = null;
                        this.gdcMain.DataSource = dtRecipe;

                        //
                        frm.Dispose();
                        if (dtRecipe.Rows.Count == 0)
                        {
                            ucTime1.timer1.Stop();
                            SkyComm.CloseWin(this);
                        }
                        SkyComm.GetCardBalance();
                        lblYE.Text = SkyComm.cardBlance.ToString();
                    }
                    else
                    {
                        ucTime1.timer1.Start();
                        return;
                    }
                }
            }
        }