Example #1
0
        /// <summary>
        /// 根据sql语句插叙医疗组维护信息
        /// </summary>
        /// <param name="strSql"></param>
        /// <returns></returns>
        private List <Neusoft.HISFC.Models.Order.Inpatient.MedicalTeam> ExcuteQueryBySql(string strSql)
        {
            int returnValue = this.ExecQuery(strSql);

            if (returnValue < 0)
            {
                return(null);
            }
            List <Neusoft.HISFC.Models.Order.Inpatient.MedicalTeam> medicalTeamList = new List <Neusoft.HISFC.Models.Order.Inpatient.MedicalTeam>();

            while (this.Reader.Read())
            {
                Neusoft.HISFC.Models.Order.Inpatient.MedicalTeam medicalTeamObj = new Neusoft.HISFC.Models.Order.Inpatient.MedicalTeam();
                medicalTeamObj.Dept.ID       = this.Reader[0].ToString();
                medicalTeamObj.Dept.Name     = this.Reader[1].ToString();
                medicalTeamObj.ID            = this.Reader[2].ToString();
                medicalTeamObj.Name          = this.Reader[3].ToString();
                medicalTeamObj.IsValid       = Neusoft.FrameWork.Function.NConvert.ToBoolean(this.Reader[4].ToString());
                medicalTeamObj.Oper.ID       = this.Reader[5].ToString();
                medicalTeamObj.Oper.OperTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[6].ToString());
                medicalTeamList.Add(medicalTeamObj);
            }
            this.Reader.Close();
            return(medicalTeamList);
        }
Example #2
0
        /// <summary>
        /// 插入或删除信息
        /// </summary>
        /// <param name="sqlIndex"></param>
        /// <param name="medicalTeam"></param>
        /// <returns></returns>
        private int InsertOrUpdateTable(string sqlIndex, Neusoft.HISFC.Models.Order.Inpatient.MedicalTeam medicalTeam)
        {
            string[] args = this.GetArgs(medicalTeam);

            string strSql = string.Empty;

            int returnValue = this.Sql.GetSql(sqlIndex, ref strSql);

            if (returnValue < 0)
            {
                this.Err = "查询" + sqlIndex + "对应的sql语句失败!\n" + this.Sql.Err;
                return(-1);
            }

            try
            {
                strSql = string.Format(strSql, args);
            }
            catch (Exception ex)
            {
                this.Err = "格式化字符串出错!\n" + ex.Message;
                return(-1);
            }



            return(this.ExecNoQuery(strSql));
        }
Example #3
0
        public new MedicalTeam Clone()
        {
            MedicalTeam medicalTeam = base.Clone() as MedicalTeam;

            medicalTeam.Dept = this.dept.Clone();
            //medicalTeam.MedicalTeamObject = this.medicalTeamObject.Clone();
            medicalTeam.Oper = this.oper.Clone();
            return(medicalTeam);
        }
Example #4
0
 private string[] GetArgs(Neusoft.HISFC.Models.Order.Inpatient.MedicalTeam medicalTeam)
 {
     string[] args = new string[]
     {
         medicalTeam.Dept.ID,
         medicalTeam.Dept.Name,
         medicalTeam.ID,
         medicalTeam.Name,
         Neusoft.FrameWork.Function.NConvert.ToInt32(medicalTeam.IsValid).ToString(),
         medicalTeam.Oper.ID,
         medicalTeam.Oper.OperTime.ToString()
     };
     return(args);
 }
Example #5
0
 /// <summary>
 /// 更新数据
 /// </summary>
 /// <param name="medicalTeam"></param>
 /// <returns></returns>
 public int UpdateMedicalTeam(Neusoft.HISFC.Models.Order.Inpatient.MedicalTeam medicalTeam)
 {
     return(this.InsertOrUpdateTable("MedicalTeam.Update", medicalTeam));
 }