示例#1
0
        //public string GetNewData(string Name,string CardNo) {
        //    FC_DA_Data data = new FC_DA_Data();
        //    NewDataSet set= data.GetNewDataSet(Name, CardNo);
        //    try
        //    {
        //        if (set != null)
        //        {
        //            return SerializerNewDataSet(set);
        //        }
        //        else
        //        {
        //            return "<?xml version=\"1.0\" encoding=\"GB2312\"?><NewDataSet><NOResult>无返回结果</NOResult></NewDataSet> ";
        //        }
        //    }
        //    catch (Exception ex) {
        //        return string.Format("<?xml version=\"1.0\" encoding=\"GB2312\"?>< NewDataSet ><NOResult>{0}</NOResult></NewDataSet> ",ex.Message);
        //    }
        //}

        public NewDataSet GetNewData(string Name, string CardNo)
        {
            FC_DA_Data data = new FC_DA_Data();
            NewDataSet set  = data.GetNewDataSet(Name, CardNo);

            try
            {
                if (set != null)
                {
                    return(set);
                }
                else
                {
                    return(new NewDataSet {
                        NOResult = "无返回结果"
                    });
                }
            }
            catch (Exception ex)
            {
                return(new NewDataSet {
                    NOResult = ex.Message
                });
            }
        }
示例#2
0
        public string GetNewData(string Name, string CardNo)
        {
            FC_DA_Data data = new FC_DA_Data();
            NewDataSet set  = data.GetNewDataSet(Name, CardNo);

            try
            {
                if (set != null)
                {
                    return(SerializerNewDataSet(set));
                }
                else
                {
                    return("<?xml version=\"1.0\" encoding=\"GB2312\"?><NewDataSet><NOResult>无返回结果</NOResult></NewDataSet> ");
                }
            }
            catch (Exception ex)
            {
                return(string.Format("<?xml version=\"1.0\" encoding=\"GB2312\"?>< NewDataSet ><NOResult>{0}</NOResult></NewDataSet> ", ex.Message));
            }
        }