Exemplo n.º 1
0
        /// <summary>
        /// 更新限额
        /// </summary>
        /// <param name="medTechItemTemp">科室扩展属性类</param>
        /// <returns>-1-失败;影响的行数</returns>
        public int UpdateItemLimit(Neusoft.HISFC.Models.Terminal.MedTechItemTemp medTechItemTemp)
        {
            // SQL语句
            string strSQL = "";

            //取更新操作的SQL语句
            if (this.Sql.GetSql("MedTech.ItemArray.UpdateItemLimit", ref strSQL) == -1)
            {
                this.Err = "没有找到MedTech.ItemArray.UpdateLmt字段!";
                return(-1);
            }
            try
            {
                //取参数列表
                string[] strParm = GetParms(medTechItemTemp);
                //替换SQL语句中的参数。
                strSQL = string.Format(strSQL, strParm);
            }
            catch (Exception ex)
            {
                this.Err = "匹配SQL语句时出错MedTech.ItemArray.UpdateLmt" + ex.Message;
                this.WriteErr();
                return(-1);
            }
            // 执行返回
            return(this.ExecNoQuery(strSQL));
        }
Exemplo n.º 2
0
 /// <summary>
 /// 获得update或者insert表的传入参数数组
 /// </summary>
 /// <param name="medTechItemTemp">实体</param>
 /// <returns>字符串数组</returns>
 private string[] GetParms(Neusoft.HISFC.Models.Terminal.MedTechItemTemp medTechItemTemp)
 {
     string[] strParm =
     {
         medTechItemTemp.MedTechItem.Item.ID,
         medTechItemTemp.MedTechItem.Item.Name,
         medTechItemTemp.MedTechItem.ItemExtend.UnitFlag,
         medTechItemTemp.MedTechItem.ItemExtend.Dept.ID,
         medTechItemTemp.Dept.Name,
         medTechItemTemp.MedTechItem.ItemExtend.BookTime,
         medTechItemTemp.NoonCode,
         medTechItemTemp.BookLmt.ToString(),
         medTechItemTemp.SpecialBookLmt.ToString(),
         medTechItemTemp.MedTechItem.Item.ChildPrice.ToString(),
         medTechItemTemp.MedTechItem.Item.SpecialPrice.ToString(),
         this.Operator.ID,
         this.GetSysDateTime(),
         medTechItemTemp.ConformNum.ToString(),
         medTechItemTemp.TmpFlag.ToString(),
         medTechItemTemp.StartTime,                              //{FAA10645-3E78-4866-BA0F-E4F2FF7CD8FD}
         medTechItemTemp.EndTime,                                //{FAA10645-3E78-4866-BA0F-E4F2FF7CD8FD}
         medTechItemTemp.Machine.ID                              //{FAA10645-3E78-4866-BA0F-E4F2FF7CD8FD}
     };
     // 返回
     return(strParm);
 }
Exemplo n.º 3
0
        /// <summary>
        /// 星期变化事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void neuComboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.lblMessage.Text = "";
            ucMedTechBookingTemplet medTechBookingTemplet = new ucMedTechBookingTemplet();
            ArrayList tempList = new ArrayList( );
            string    tmpFlag  = string.Empty;

            tempList = booking.QueryTemp(medTechBookingTemplet.GetDept( ).ID, this.neuComboBox1.SelectedIndex.ToString( ));
            if (tempList == null || tempList.Count == 0)
            {
                tmpFlag = "0";
            }
            else
            {
                Neusoft.HISFC.Models.Terminal.MedTechItemTemp medTechItemTemp = tempList [0] as Neusoft.HISFC.Models.Terminal.MedTechItemTemp;
                tmpFlag = medTechItemTemp.TmpFlag;
            }
            if (tmpFlag == "0")
            {
                this.lblMessage.Text = "没有模板";
            }
            else if (tmpFlag == "1")
            {
                this.lblMessage.Text = "项目模板";
            }
            else
            {
                this.lblMessage.Text = "设备模板";
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// 获取模板数组
        /// </summary>
        /// <param name="tempItemList">实体数组</param>
        /// <returns>1-成功;-1-失败</returns>
        private int GetArrayList(ref ArrayList tempItemList)
        {
            for (int i = 0; i < this.fpSpread1_Sheet1.RowCount; i++)
            {
                Neusoft.HISFC.Models.Terminal.MedTechItemTemp tempMedTechItemTemp = new MedTechItemTemp();

                if (this.GetTempItem(ref tempMedTechItemTemp, i) == -1)
                {
                    return(-1);
                }

                tempItemList.Add(tempMedTechItemTemp);
            }

            return(1);
        }
Exemplo n.º 5
0
        /// <summary>
        /// 根据SQL语句获取模板信息
        /// </summary>
        /// <param name="strSQL">SQL语句</param>
        /// <returns>模板信息数组</returns>
        private ArrayList GetSchema(string strSQL)
        {
            // 模板数组
            ArrayList list = new ArrayList();

            // 执行SQL语句
            this.ExecQuery(strSQL);

            while (this.Reader.Read())
            {
                // 模板实体
                Neusoft.HISFC.Models.Terminal.MedTechItemTemp info = new Neusoft.HISFC.Models.Terminal.MedTechItemTemp();

                // 项目编码
                info.MedTechItem.Item.ID = this.Reader[0].ToString();
                // 项目名称
                info.MedTechItem.Item.Name = this.Reader[1].ToString();
                // 单位标识
                info.MedTechItem.ItemExtend.UnitFlag = this.Reader[2].ToString();
                // 科室编码
                info.MedTechItem.ItemExtend.Dept.ID = this.Reader[3].ToString();
                // 科室名称
                info.Dept.Name = this.Reader[4].ToString();
                // 作为预约时间
                info.MedTechItem.ItemExtend.BookTime = this.Reader[5].ToString();
                // 午别
                info.NoonCode = this.Reader[6].ToString();
                // 预约限额
                info.BookLmt = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[7].ToString());
                // 特诊预约限额
                info.SpecialBookLmt = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[7].ToString());
                // 作为--已经预约数
                info.MedTechItem.Item.ChildPrice = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[9].ToString());
                // 作为--特诊预约数
                info.MedTechItem.Item.SpecialPrice = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[10].ToString());

                //开始时间    //{FAA10645-3E78-4866-BA0F-E4F2FF7CD8FD} 增加开始时间、结束时间、设备信息的读取
                info.StartTime = this.Reader[19].ToString();
                //结束时间    //{FAA10645-3E78-4866-BA0F-E4F2FF7CD8FD} 增加开始时间、结束时间、设备信息的读取
                info.EndTime = this.Reader[20].ToString();
                //执行设备    //{FAA10645-3E78-4866-BA0F-E4F2FF7CD8FD} 增加开始时间、结束时间、设备信息的读取
                info.Machine.ID = this.Reader[21].ToString();

                list.Add(info);
            }
            return(list);
        }
Exemplo n.º 6
0
        public int UpdateItemConfirm(string orderSequence, OperType operType)
        {
            // SQL语句
            string strSQL = "";
            // 排班项目信息
            ArrayList list = QuerySchema(orderSequence);

            if (list == null || list.Count == 0)
            {
                return(0);
            }
            //预约实体
            Neusoft.HISFC.Models.Terminal.MedTechItemTemp medTechItemTemp = (Neusoft.HISFC.Models.Terminal.MedTechItemTemp)list[0];
            if (operType == OperType.Minus)
            {
                //取更新操作的SQL语句
                if (this.Sql.GetSql("MedTech.ItemArray.UpdateItemConfirm.1", ref strSQL) == -1)
                {
                    this.Err = "没有找到MedTech.ItemArray.UpdateItemConfirm.1字段!";
                    return(-1);
                }
            }
            else
            {
                if (this.Sql.GetSql("MedTech.ItemArray.UpdateItemConfirm.2", ref strSQL) == -1)
                {
                    this.Err = "没有找到MedTech.ItemArray.UpdateItemConfirm.2字段!";
                    return(-1);
                }
            }
            try
            {
                //首先找到对应的预约信息 然后找到排班信息,然后更新排班信息
                strSQL = string.Format(strSQL,
                                       medTechItemTemp.MedTechItem.Item.ID,
                                       medTechItemTemp.MedTechItem.ItemExtend.BookTime,
                                       medTechItemTemp.NoonCode);
            }
            catch (Exception ex)
            {
                this.Err = "匹配SQL语句时出错MedTech.ItemArray.UpdateLmt" + ex.Message;
                this.WriteErr();
                return(-1);
            }
            // 执行返回
            return(this.ExecNoQuery(strSQL));
        }
Exemplo n.º 7
0
        /// <summary>
        /// 对实体的属性放入数组中
        /// </summary>
        /// <param name="medTechItemTemp">医技预约模板</param>
        /// <returns>字段数组</returns>
        private string [] GetParam(Neusoft.HISFC.Models.Terminal.MedTechItemTemp medTechItemTemp)
        {
            string valid = "0";

            if (medTechItemTemp.MedTechItem.Item.IsValid)
            {
                valid = "1";                 //这儿有效
            }
            string[] str = new string[]
            {
                //项目编码
                medTechItemTemp.MedTechItem.Item.ID,
                //项目名称
                medTechItemTemp.MedTechItem.Item.Name,
                //单位标识
                medTechItemTemp.MedTechItem.ItemExtend.UnitFlag,
                //科室代码
                medTechItemTemp.MedTechItem.ItemExtend.Dept.ID,
                //科室名称
                medTechItemTemp.Dept.Name,
                //星期
                medTechItemTemp.Week,
                //午别
                medTechItemTemp.NoonCode,
                //预约金额
                medTechItemTemp.BookLmt.ToString(),
                //急诊预约金额
                medTechItemTemp.SpecialBookLmt.ToString(),
                //有效标识
                valid,
                //注意事项
                medTechItemTemp.MedTechItem.Item.Notice,
                //操作员
                medTechItemTemp.MedTechItem.Item.Oper.ID,
                //13操作时间
                medTechItemTemp.MedTechItem.Item.Oper.OperTime.ToString(),
                //标识位
                medTechItemTemp.TmpFlag.ToString(),
                //开始时间          {FAA10645-3E78-4866-BA0F-E4F2FF7CD8FD}
                medTechItemTemp.StartTime,
                //结束时间          {FAA10645-3E78-4866-BA0F-E4F2FF7CD8FD}
                medTechItemTemp.EndTime
            };
            return(str);
        }
Exemplo n.º 8
0
        /// <summary>
        /// 获取预约排班模板
        /// </summary>
        /// <param name="strSQL">SQL语句</param>
        /// <returns>预约排班模板数组</returns>
        private ArrayList QuerySchemaBase(string strSQL)
        {
            // 预约排班模板数组
            ArrayList schemaList = new ArrayList();

            // 执行查询
            this.ExecQuery(strSQL);
            // 转换到数组
            while (this.Reader.Read())
            {
                // 临时模板
                Neusoft.HISFC.Models.Terminal.MedTechItemTemp medTechItemTemp = new Neusoft.HISFC.Models.Terminal.MedTechItemTemp();

                // 项目编码
                medTechItemTemp.MedTechItem.Item.ID = this.Reader[0].ToString();
                // 项目名称
                medTechItemTemp.MedTechItem.Item.Name = this.Reader[1].ToString();
                // 单位标识
                medTechItemTemp.MedTechItem.ItemExtend.UnitFlag = this.Reader[2].ToString();
                // 科室编码
                medTechItemTemp.MedTechItem.ItemExtend.Dept.ID = this.Reader[3].ToString();
                // 科室名称
                medTechItemTemp.Dept.Name = this.Reader[4].ToString();
                // 作为预约时间
                medTechItemTemp.MedTechItem.ItemExtend.BookTime = this.Reader[5].ToString();
                // 午别
                medTechItemTemp.NoonCode = this.Reader[6].ToString();
                // 预约限额
                medTechItemTemp.BookLmt = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[7].ToString());
                // 特诊预约限额
                medTechItemTemp.SpecialBookLmt = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[7].ToString());
                // 作为--已经预约数
                medTechItemTemp.MedTechItem.Item.ChildPrice = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[9].ToString());
                // 作为--特诊预约数
                medTechItemTemp.MedTechItem.Item.SpecialPrice = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[10].ToString());
                //				temp.MedTechItem.Item.OperInfo.ID = this.Reader[11].ToString() ;//操作员 
                //				temp.MedTechItem.Item.OperDate = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[12]);//操作日期

                schemaList.Add(medTechItemTemp);
            }
            // 返回结果
            return(schemaList);
        }
Exemplo n.º 9
0
        /// <summary>
        /// 将表中数据转换为实体集合
        /// </summary>
        /// <param name="tempDataTable">数据表</param>
        /// <returns></returns>
        private ArrayList GetChanges(DataTable tempDataTable)
        {
            this.arrayList = new ArrayList();
            if (tempDataTable != null)
            {
                try
                {
                    foreach (DataRow row in tempDataTable.Rows)
                    {
                        Neusoft.HISFC.Models.Terminal.MedTechItemTemp tempMedTechItemTemp = new MedTechItemTemp();
                        //{5A111831-190D-4187-8076-83E220BC97B2}

                        tempMedTechItemTemp.MedTechItem.Item.ID             = row["ItemCode"].ToString();
                        tempMedTechItemTemp.MedTechItem.Item.Name           = row["ItemName"].ToString();
                        tempMedTechItemTemp.MedTechItem.ItemExtend.UnitFlag = row["UnitFlag"].ToString();
                        tempMedTechItemTemp.MedTechItem.ItemExtend.Dept.ID  = this.operEnvironment.Dept.ID;
                        tempMedTechItemTemp.Dept.Name = this.operEnvironment.Dept.Name;
                        tempMedTechItemTemp.MedTechItem.ItemExtend.BookTime = this.seeDate.ToString();
                        tempMedTechItemTemp.NoonCode       = noonListHelper.GetID(row["Noon"].ToString());
                        tempMedTechItemTemp.BookLmt        = Neusoft.FrameWork.Function.NConvert.ToDecimal(row["BookLmt"]);
                        tempMedTechItemTemp.SpecialBookLmt = Neusoft.FrameWork.Function.NConvert.ToDecimal(row["SpecialBookLmt"]);
                        tempMedTechItemTemp.MedTechItem.Item.ChildPrice     = Neusoft.FrameWork.Function.NConvert.ToDecimal(row["BookNum"]);
                        tempMedTechItemTemp.MedTechItem.Item.SpecialPrice   = Neusoft.FrameWork.Function.NConvert.ToDecimal(row["SpecialBookNum"]);
                        tempMedTechItemTemp.MedTechItem.Item.Oper.ID        = this.operEnvironment.ID;
                        tempMedTechItemTemp.MedTechItem.ItemExtend.UnitFlag = this.GetUnitIDByName(row["UnitFlag"].ToString());
                        tempMedTechItemTemp.TmpFlag    = row ["TmpFlag"].ToString( );
                        tempMedTechItemTemp.StartTime  = row["StartTime"].ToString();
                        tempMedTechItemTemp.EndTime    = row["EndTime"].ToString();
                        tempMedTechItemTemp.Machine.ID = row["Machine"].ToString();
                        this.arrayList.Add(tempMedTechItemTemp);
                    }
                }
                catch (Exception e)
                {
                    MessageBox.Show("生成实体集合时出错!" + e.Message, "提示");
                    return(null);
                }
            }

            return(this.arrayList);
        }
Exemplo n.º 10
0
        /// <summary>
        /// 更新预约限额
        /// </summary>
        /// <param name="tempMedTechItemTemp">预约模板</param>
        /// <returns>-1-失败;影响的行数</returns>
        public int UpdateItemBookingNumber(Neusoft.HISFC.Models.Terminal.MedTechItemTemp tempMedTechItemTemp)
        {
            string strSQL = "";

            //取更新操作的SQL语句
            if (this.Sql.GetSql("MedTech.ItemArray.UpdateItemBookNum", ref strSQL) == -1)
            {
                this.Err = "没有找到MedTech.ItemArray.UpdateLmt字段!";
                return(-1);
            }
            try
            {
                strSQL = string.Format(strSQL, tempMedTechItemTemp.MedTechItem.Item.ID, tempMedTechItemTemp.MedTechItem.ItemExtend.BookTime.ToString(), tempMedTechItemTemp.NoonCode, tempMedTechItemTemp.MedTechItem.Item.ChildPrice.ToString(), tempMedTechItemTemp.MedTechItem.Item.SpecialPrice.ToString(), tempMedTechItemTemp.MedTechItem.ItemExtend.Dept.ID);
            }
            catch (Exception ex)
            {
                this.Err = "格式化SQL语句时出错MedTech.ItemArray.UpdateLmt" + ex.Message;
                this.WriteErr();
                return(-1);
            }
            return(this.ExecNoQuery(strSQL));
        }
Exemplo n.º 11
0
        public int Update(Neusoft.HISFC.Models.Terminal.MedTechItemTemp medTechItemTemp)
        {
            // SQL语句
            string strSql = "";

            // 获取SQL语句
            if (this.Sql.GetSql("MedTech.ItemTemp.Update", ref strSql) == -1)
            {
                this.Err = "获取SQL语句MedTech.ItemTemp.Update失败!";
                return(-1);
            }
            // 匹配SQL语句
            try
            {
                //strSql = string.Format(strSql, GetParam(medTechItemTemp));
                return(this.ExecNoQuery(strSql, GetParam(medTechItemTemp)));
            }
            catch (Exception ee)
            {
                this.Err = ee.Message;
                return(-1);
            }
        }
Exemplo n.º 12
0
        public int UpdateMedTechItemTemp(Neusoft.HISFC.Models.Terminal.MedTechItemTemp medTechItemTemp)
        {
            this.SetDB(serviceMedTechItemTemp);

            return(serviceMedTechItemTemp.Update(medTechItemTemp));
        }
Exemplo n.º 13
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <returns>0-成功;-1-失败</returns>
        public int Save()
        {
            if (this.fpSpread1_Sheet1.RowCount == 0)
            {
                return(1);
            }
            this.fpSpread1.StopCellEditing();
            fpSpread1.SetAllListBoxUnvisible();

            ////增加
            //DataTable dataTableAdd = this.dsItems.GetChanges(DataRowState.Added);
            ////修改
            //DataTable dataTableModify = this.dsItems.GetChanges(DataRowState.Modified);
            ////删除
            //DataTable dataTableDelete = this.dsItems.GetChanges(DataRowState.Deleted);
            // 数据库事务

            //Neusoft.FrameWork.Management.Transaction transaction = new Transaction(Neusoft.FrameWork.Management.Connection.Instance);
            //// 错误信息
            //string rtnText = "";
            // 实体数组
            ArrayList tempItemList = new ArrayList();

            ////验证
            //if (Valid(dataTableAdd) == -1)
            //{
            //    return -1;
            //}
            //if (Valid(dataTableModify) == -1)
            //{
            //    return -1;
            //}
            ////转为实体集合
            //ArrayList alAdd = this.GetChanges(dataTableAdd);
            //if (alAdd == null)
            //{
            //    return -1;
            //}
            //ArrayList alModify = this.GetChanges(dataTableModify);
            //if (alModify == null)
            //{
            //    return -1;
            //}
            //防止主键重复
            if (this.Valid() == -1)
            {
                MessageBox.Show("维护项目重复!请确定相同午别内没有重复项目后保存!");
                return(-1);
            }

            // 获取要保存的

            Neusoft.FrameWork.Management.PublicTrans.BeginTransaction();
            //transaction.BeginTransaction();

            this.bookingIntegrate.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans);

            for (int i = 0; i < this.fpSpread1_Sheet1.RowCount; i++)
            {
                Neusoft.HISFC.Models.Terminal.MedTechItemTemp tempItemTemp = new MedTechItemTemp();
                // 获取一行为实体
                if (this.GetTempItem(ref tempItemTemp, i) == -1)
                {
                    Neusoft.FrameWork.Management.PublicTrans.RollBack();
                    return(-1);
                }
                // 先删除

                if (this.bookingIntegrate.DeleteMedTechItemArrange(this.operEnvironment.Dept.ID, tempItemTemp.MedTechItem.Item.ID, this.seeDate.ToString(), noonListHelper.GetID(this.fpSpread1_Sheet1.Cells[i, (int)cols.OldNoon].Text)) == -1)
                {
                    Neusoft.FrameWork.Management.PublicTrans.RollBack();
                    MessageBox.Show(this.bookingIntegrate.Err);
                    return(-1);
                }
                // 再增加

                if (this.bookingIntegrate.InsertMedTechItemArrange(tempItemTemp) == -1)
                {
                    Neusoft.FrameWork.Management.PublicTrans.RollBack();
                    MessageBox.Show(this.bookingIntegrate.Err);
                    return(-1);
                }
            }

            //if (dataTableDelete != null)
            //{
            //    dataTableDelete.RejectChanges();

            //    if (this.SaveDelete(dataTableDelete, ref rtnText) == -1)
            //    {
            //        transaction.RollBack();
            //        MessageBox.Show(rtnText, "提示");
            //        return -1;
            //    }
            //}

            //if (this.SaveAdd(alAdd, ref rtnText) == -1)
            //{
            //    transaction.RollBack();
            //    MessageBox.Show(rtnText, "提示");
            //    return -1;
            //}
            //if (alModify != null && alModify.Count != 0)
            //{
            //    if (this.SaveModify(alModify, dataTableModify, ref rtnText) == -1)
            //    {
            //        transaction.RollBack();
            //        MessageBox.Show(rtnText, "提示");
            //        return -1;
            //    }
            //}


            Neusoft.FrameWork.Management.PublicTrans.Commit();

            dsItems.AcceptChanges();
            this.SetFpFormat();

            return(0);
        }
Exemplo n.º 14
0
        /// <summary>
        /// 删除
        /// </summary>
        public void Delete()
        {
            // 行号
            int row = this.fpSpread1_Sheet1.ActiveRowIndex;

            // 事务
            //Neusoft.FrameWork.Management.Transaction transaction = new Transaction(Neusoft.FrameWork.Management.Connection.Instance);
            // 实体
            Neusoft.HISFC.Models.Terminal.MedTechItemTemp tempItemTemp = new MedTechItemTemp();

            if (row < 0 || this.fpSpread1_Sheet1.RowCount == 0)
            {
                return;
            }
            if (!this.fpSpread1_Sheet1.Cells[row, (int)cols.Noon].Locked)
            {
                this.fpSpread1.SetAllListBoxUnvisible();
                this.fpSpread1.EditModePermanent = false;
                this.fpSpread1.EditModeReplace   = false;
                this.fpSpread1_Sheet1.Rows.Remove(row, 1);
                this.fpSpread1.EditModePermanent = true;
                this.fpSpread1.EditModeReplace   = true;
                MessageBox.Show("删除成功");
                return;
            }

            if (MessageBox.Show("是否删除该条排班?", "提示信息", MessageBoxButtons.YesNo, MessageBoxIcon.Question,
                                MessageBoxDefaultButton.Button2) == DialogResult.No)
            {
                return;
            }

            this.fpSpread1.StopCellEditing();

            Neusoft.FrameWork.Management.PublicTrans.BeginTransaction();
            //transaction.BeginTransaction();
            applyMgr.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans);
            this.bookingIntegrate.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans);


            ArrayList list = applyMgr.QueryMedTechApplyDetailList(operEnvironment.Dept.ID, noonListHelper.GetID(this.fpSpread1_Sheet1.Cells[row, (int)cols.OldNoon].Text), fpSpread1_Sheet1.Cells[row, (int)cols.ItemCode].Text, seeDate, seeDate);

            if (list == null)
            {
                Neusoft.FrameWork.Management.PublicTrans.RollBack();
                MessageBox.Show("获取信息失败" + applyMgr.Err);
                return;
            }
            if (list.Count > 0)
            {
                Neusoft.FrameWork.Management.PublicTrans.RollBack();
                MessageBox.Show("本次排班已经被使用不能删除" + applyMgr.Err);
                return;
            }
            if (this.bookingIntegrate.DeleteMedTechItemArrange(this.operEnvironment.Dept.ID, this.fpSpread1_Sheet1.Cells[row, (int)cols.ItemCode].Text, this.seeDate.ToString(), noonListHelper.GetID(this.fpSpread1_Sheet1.Cells[row, (int)cols.OldNoon].Text)) <= 0)
            {
                Neusoft.FrameWork.Management.PublicTrans.RollBack();
                MessageBox.Show("删除失败" + this.bookingIntegrate.Err);
                return;
            }

            this.fpSpread1_Sheet1.Rows.Remove(row, 1);

            Neusoft.FrameWork.Management.PublicTrans.Commit();
            MessageBox.Show("删除成功");

            this.fpSpread1.Focus();
        }
Exemplo n.º 15
0
        /// <summary>
        /// 医技预约排班模板,可能是一条或者多条
        /// 私有方法,在其他方法中调用
        /// </summary>
        /// <param name="SQL">SQL语句</param>
        /// <returns>医技预约排班模板信息对象数组</returns>
        private ArrayList GetItem(string SQL)
        {
            // 返回的医技预约排班模板数组
            ArrayList tempList = new ArrayList();

            //
            //执行查询语句
            //
            if (this.ExecQuery(SQL) == -1)
            {
                this.Err     = "获得医技预约排班模板信息时,执行SQL语句出错!" + this.Err;
                this.ErrCode = "-1";
                return(null);
            }
            try
            {
                while (this.Reader.Read())
                {
                    //临时医技预约排班模板
                    Neusoft.HISFC.Models.Terminal.MedTechItemTemp Item = new Neusoft.HISFC.Models.Terminal.MedTechItemTemp();
                    // 是否有效
                    bool bl = true;

                    if (this.Reader[11].ToString().ToUpper() == "FALSE" || this.Reader[11].ToString() == "0")
                    {
                        bl = false;
                    }
                    Item.MedTechItem.Item.ID             = this.Reader[2].ToString();
                    Item.MedTechItem.Item.Name           = this.Reader[3].ToString();
                    Item.MedTechItem.ItemExtend.UnitFlag = this.Reader[4].ToString();
                    Item.MedTechItem.ItemExtend.Dept.ID  = this.Reader[5].ToString();
                    Item.Dept.Name                      = this.Reader[6].ToString();
                    Item.Week                           = this.Reader[7].ToString();
                    Item.NoonCode                       = this.Reader[8].ToString();
                    Item.BookLmt                        = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[9].ToString());
                    Item.SpecialBookLmt                 = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[10].ToString());
                    Item.MedTechItem.Item.IsValid       = bl;
                    Item.MedTechItem.Item.Notice        = this.Reader[12].ToString();
                    Item.MedTechItem.Item.Oper.ID       = this.Reader[13].ToString();
                    Item.MedTechItem.Item.Oper.OperTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[14].ToString());
                    Item.TmpFlag                        = this.Reader [15].ToString( );
                    //{FAA10645-3E78-4866-BA0F-E4F2FF7CD8FD}
                    if (this.Reader.FieldCount > 15)
                    {
                        Item.StartTime = this.Reader[16].ToString();
                        Item.EndTime   = this.Reader[17].ToString();
                    }

                    tempList.Add(Item);
                }
            }
            catch (Exception ex)
            {
                this.Err     = "获得医技预约排班模板信息时出错!" + ex.Message;
                this.ErrCode = "-1";
                return(null);
            }
            this.Reader.Close();
            this.ProgressBarValue = -1;
            //
            // 成功返回
            //
            return(tempList);
        }
Exemplo n.º 16
0
        /// <summary>
        /// 更新预约限额
        /// </summary>
        /// <param name="tempMedTechItemTemp">预约模板</param>
        /// <returns>-1-失败;影响的行数</returns>
        public int UpdateItemBookingNumber(Neusoft.HISFC.Models.Terminal.MedTechItemTemp tempMedTechItemTemp)
        {
            this.SetDB(serviceMedTechItemArray);

            return(serviceMedTechItemArray.UpdateItemBookingNumber(tempMedTechItemTemp));
        }
Exemplo n.º 17
0
        /// <summary>
        /// 插入医技预约排班
        /// </summary>
        /// <param name="medTechItemTemp">医技预约模板</param>
        /// <returns>-1-失败;影响的行数</returns>
        public int InsertMedTechItemArrange(Neusoft.HISFC.Models.Terminal.MedTechItemTemp medTechItemTemp)
        {
            this.SetDB(serviceMedTechItemArray);

            return(serviceMedTechItemArray.Insert(medTechItemTemp));
        }
Exemplo n.º 18
0
        /// <summary>
        /// 取信息列表,可能是一条或者多条
        /// 私有方法,在其他方法中调用
        /// </summary>
        /// <param name="SQL">SQL语句</param>
        /// <returns>膳食项目信息信息对象数组</returns>
        private ArrayList GetItem(string SQL)
        {
            // 膳食项目信息信息对象数组
            ArrayList medTechItemList = new ArrayList();

            // 膳食项目信息实体
            Neusoft.HISFC.Models.Terminal.MedTechItemTemp temp;
            //
            //执行查询语句
            //
            if (this.ExecQuery(SQL) == -1)
            {
                this.Err     = "获得膳食项目信息时,执行SQL语句出错!" + this.Err;
                this.ErrCode = "-1";
                return(null);
            }
            try
            {
                while (this.Reader.Read())
                {
                    //取查询结果中的记录
                    temp = new Neusoft.HISFC.Models.Terminal.MedTechItemTemp();

                    // 项目编码
                    temp.MedTechItem.Item.ID = this.Reader[0].ToString();
                    // 项目名称
                    temp.MedTechItem.Item.Name = this.Reader[1].ToString();
                    // 单位标识
                    temp.MedTechItem.ItemExtend.UnitFlag = this.Reader[2].ToString();
                    // 科室编码
                    temp.MedTechItem.ItemExtend.Dept.ID = this.Reader[3].ToString();
                    // 科室名称
                    temp.Dept.Name = this.Reader[4].ToString();
                    // 作为预约时间
                    temp.MedTechItem.ItemExtend.BookTime = this.Reader[5].ToString();
                    // 午别
                    temp.NoonCode = this.Reader[6].ToString();
                    // 预约限额
                    temp.BookLmt = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[7].ToString());
                    // 特诊预约限额
                    temp.SpecialBookLmt = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[8].ToString());
                    // 作为--已经预约数
                    temp.MedTechItem.Item.ChildPrice = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[9].ToString());
                    // 作为--特诊预约数
                    temp.MedTechItem.Item.SpecialPrice = Neusoft.FrameWork.Function.NConvert.ToDecimal(this.Reader[10].ToString());
                    // 操作员
                    temp.MedTechItem.Item.Oper.ID = this.Reader[11].ToString();
                    // 操作日期
                    temp.MedTechItem.Item.Oper.OperTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[12]);
                    //标识位
                    temp.TmpFlag = this.Reader [14].ToString( );
                    //{FAA10645-3E78-4866-BA0F-E4F2FF7CD8FD} 增加开始时间、结束时间、设备信息的读取
                    if (this.Reader.FieldCount > 14)
                    {
                        //开始时间
                        temp.StartTime = this.Reader[15].ToString();
                        //结束时间
                        temp.EndTime = this.Reader[16].ToString();
                        //设备
                        temp.Machine.ID = this.Reader[17].ToString();
                    }

                    medTechItemList.Add(temp);
                }
            }            //抛出错误
            catch (Exception ex)
            {
                this.Err     = "获得信息时出错!" + ex.Message;
                this.ErrCode = "-1";
                return(null);
            }
            this.Reader.Close();

            this.ProgressBarValue = -1;
            // 返回
            return(medTechItemList);
        }