Exemple #1
0
        public override bool Exists(IModel ideptVsQueue)
        {
            MDeptVsQueue deptVsQueue = (MDeptVsQueue)ideptVsQueue;

            strSql = "select * from " + TableName + " where QUEUE_ID=" + deptVsQueue.QUEUE_ID;
            return(recordIsExist(strSql));
        }
Exemple #2
0
        /// <summary>
        /// 更新指定的对照记录
        /// </summary>
        /// <param name="ideptVsQueue"></param>
        /// <param name="where"></param>
        /// <returns></returns>
        public override int Update(IModel ideptVsQueue, string where)
        {
            MDeptVsQueue deptVsQueue = (MDeptVsQueue)ideptVsQueue;
            Hashtable    ht          = new Hashtable();

            ht.Add("QUEUE_ID", deptVsQueue.QUEUE_ID);
            ht.Add("DEPT_CODE", deptVsQueue.DEPT_CODE);
            ht.Add("QUEUE_NAME", deptVsQueue.QUEUE_NAME);
            return(ExecuteSql(StringConstructor.UpdateSql(TableName, ht, where).ToString()));
        }
Exemple #3
0
        /// <summary>
        /// 获取指定队列ID的对照记录
        /// </summary>
        /// <param name="QUEUE_ID"></param>
        /// <returns></returns>
        public override IModel GetModel(string QUEUE_ID)
        {
            strSql = "select * from " + TableName + " where QUEUE_ID = " + QUEUE_ID;
            DataTable dt = GetDataTable(strSql);

            if (dt.Rows.Count == 0)
            {
                return(null);
            }
            MDeptVsQueue deptVsQueue = new MDeptVsQueue();

            deptVsQueue.QUEUE_ID   = Convert.ToInt32(dt.Rows[0]["QUEUE_ID"].ToString());
            deptVsQueue.DEPT_CODE  = dt.Rows[0]["DEPT_CODE"].ToString();
            deptVsQueue.QUEUE_NAME = dt.Rows[0]["QUEUE_NAME"].ToString();
            return(deptVsQueue);
        }