Ejemplo n.º 1
0
        internal static List <AttrBase> getAttrList(AttrBase.TypeList type)
        {
            List <AttrBase> retObj = new List <AttrBase>();

            try
            {
                MysqlDBA <AttrBase> mysqlDBA = new MysqlDBA <AttrBase>(FunctionController.CONNSTR);
                AttrBase            attrBase = new AttrBase();

                switch (type)
                {
                case AttrBase.TypeList.Medical:
                    attrBase.AttrType = "1";
                    break;

                case AttrBase.TypeList.Longterm:
                    attrBase.AttrType = "2";
                    break;

                case AttrBase.TypeList.Other:
                    attrBase.AttrType = "3";
                    break;
                }
                retObj = (List <AttrBase>)mysqlDBA.getDataListNoKey(attrBase);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(retObj);
        }
Ejemplo n.º 2
0
        public string getBaseAttrCode(string medInst)
        {
            string strRet = string.Empty;

            try
            {
                MysqlDBA <AttrBase> mysqlDBA_AttrBase = new MysqlDBA <AttrBase>(CONNSTR);
                AttrBase            baseattr          = new AttrBase();
                baseattr.AttrCode = medInst;
                List <AttrBase> objLst = (List <AttrBase>)mysqlDBA_AttrBase.getDataListNoKey(baseattr);
                if (objLst.Count > 0)
                {
                    strRet = objLst[0].AttrCode;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(strRet);
        }
Ejemplo n.º 3
0
        public static string getBaseAttr(string attrMed)
        {
            string strRet = string.Empty;

            try
            {
                MysqlDBA <AttrBase> mysqlDBA_AttrBase = new MysqlDBA <AttrBase>(FunctionController.CONNSTR);
                AttrBase            baseattr          = new AttrBase();
                baseattr.AttrCode = attrMed;
                List <AttrBase> objLst = (List <AttrBase>)mysqlDBA_AttrBase.getDataList(baseattr);
                if (objLst.Count > 0)
                {
                    strRet = objLst[0].AttrName;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(strRet);
        }