예제 #1
0
        public override string QueryResult()
        {
            JsonModel jsonModel = new JsonModel();

            try
            {
                ParamModel paramModel = Newtonsoft.Json.JsonConvert.DeserializeObject <ParamModel>(this.Data);
                TF.RunSafty.BLL.Place.VIEW_Base_Site_DutyPlace bllPlace = new TF.RunSafty.BLL.Place.VIEW_Base_Site_DutyPlace();
                string strTrainJiaolu = paramModel.data.trainjiaoluID;
                string strSite        = paramModel.data.siteID;
                List <TF.RunSafty.Model.VIEW_Base_Site_DutyPlace> placeList = bllPlace.GetPlaceOfClient(strTrainJiaolu, strSite);
                jsonModel.result    = 0;
                jsonModel.resultStr = "提交成功";
                jsonModel.data      = GetPlaceList(placeList);
            }
            catch (Exception ex)
            {
                TF.CommonUtility.LogClass.logex(ex, "");
                jsonModel.result    = 1;
                jsonModel.resultStr = "提交失败";
            }
            string result = Newtonsoft.Json.JsonConvert.SerializeObject(jsonModel);

            return(result);
        }
예제 #2
0
        public Client_Out GetPlaceOfClient(string data)
        {
            Client_Out json = new Client_Out();

            try
            {
                Client_In input = Newtonsoft.Json.JsonConvert.DeserializeObject <Client_In>(data);
                TF.RunSafty.BLL.Place.VIEW_Base_Site_DutyPlace    bllPlace  = new TF.RunSafty.BLL.Place.VIEW_Base_Site_DutyPlace();
                List <TF.RunSafty.Model.VIEW_Base_Site_DutyPlace> placeList = bllPlace.GetPlaceOfClient(input.trainjiaoluID, input.siteID);
                json.result    = "0";
                json.resultStr = "提交成功";
                json.data      = GetPlaceListOfClient(placeList);
            }
            catch (Exception ex)
            {
                TF.CommonUtility.LogClass.logex(ex, "");
                json.result    = "1";
                json.resultStr = "提交失败" + ex.Message;
            }
            return(json);
        }