Example #1
0
        /// <summary>
        /// 获取指定分机id的面板名称
        /// </summary>
        /// <param name="num">面板号</param>
        /// <param name="id">分机id</param>
        public static string GetPanelName(string id, string num)
        {
            string sql = @"select a.PanelName from ipvt_panelinfotable as a inner join ipvt_extensionmessagetable as b
                             on a.ExtensionID=b.ExtensionID where a.PanelNum=?num and b.ExtensionNO=?id  ";

            MySqlParameter[] pars =
            {
                new MySqlParameter("?num", num),
                new MySqlParameter("?id",  EvaluationHelper.StringToInt(id))
            };
            var result = CustomMySqlHelper.ExecuteScalar(sql, pars);

            return(EvaluationHelper.ObjectToString(result));
        }