Example #1
0
        public string MODIFYCALENDAR(string data, string I_CALENDAY, string I_WORKDAY, string isworkday)
        {
            ZSL_CALENDARList node = new ZSL_CALENDARList();

            //ZSL_WORKDAY    ZSL_CALENDAR
            if (I_CALENDAY == "X")
            {
                ZSL_CALENDAR     zsl_calendar  = Newtonsoft.Json.JsonConvert.DeserializeObject <ZSL_CALENDAR>(data);
                ZSL_CALENDARList node_res      = psModels.CNFH.ZPSFUG_Q_CALENDAR(zsl_calendar.CDATE, zsl_calendar.CDATE);
                ZSL_CALENDAR     node_calendar = node_res.ZSL_CALENDAR[0];
                if (isworkday == "X")
                {
                    node_calendar.ISWORKDAY = node_calendar.ISWORKDAY == "X" ? "" : "X";
                }
                else
                {
                    node_calendar.ISHOILDAY = node_calendar.ISHOILDAY == "X" ? "" : "X";
                }
                List <ZSL_CALENDAR> calendarlist = new List <ZSL_CALENDAR>();
                calendarlist.Add(node_calendar);
                List <ZSL_WORKDAY> workdaylist = new List <ZSL_WORKDAY>();
                node.ZSL_WORKDAY  = workdaylist.ToArray();
                node.ZSL_CALENDAR = calendarlist.ToArray();
            }
            else if (I_WORKDAY == "X")
            {
                ZSL_WORKDAY[] ZSL_WORKDAY = Newtonsoft.Json.JsonConvert.DeserializeObject <ZSL_WORKDAY[]>(data);
                node.ZSL_WORKDAY = ZSL_WORKDAY;
                List <ZSL_CALENDAR> calendarlist = new List <ZSL_CALENDAR>();
                node.ZSL_CALENDAR = calendarlist.ToArray();
            }
            Sonluk.UI.Model.PS.CNFHService.PS_MSG ps_msg = psModels.CNFH.ZPSFUG_M_CALENDAR(node, I_CALENDAY, I_WORKDAY);
            return(Newtonsoft.Json.JsonConvert.SerializeObject(ps_msg));
        }
Example #2
0
        public string ZPSFUG_M_GZCN(string gzcn, string t435t, string flag)
        {
            T435T[]             T435Tarr = Newtonsoft.Json.JsonConvert.DeserializeObject <T435T[]>(t435t);
            ZSL_GZCN            gzcns    = Newtonsoft.Json.JsonConvert.DeserializeObject <ZSL_GZCN>(gzcn);
            List <ZSL_GZ_VLSCH> nodes    = new List <ZSL_GZ_VLSCH>();

            for (int i = 0; i < T435Tarr.Length; i++)
            {
                ZSL_GZ_VLSCH node = new ZSL_GZ_VLSCH();
                node.GZMS  = gzcns.GZMS;
                node.VLSCH = T435Tarr[i].VLSCH;
                nodes.Add(node);
            }
            Sonluk.UI.Model.PS.CNFHService.PS_MSG ps_msg = psModels.CNFH.ZPSFUG_M_GZCN(gzcns, nodes.ToArray(), flag);

            return(Newtonsoft.Json.JsonConvert.SerializeObject(ps_msg));
        }
Example #3
0
 public string UpdateNetworkSap(string data)
 {
     ZSL_NETWORK[] networkList = Newtonsoft.Json.JsonConvert.DeserializeObject <ZSL_NETWORK[]>(data);
     Sonluk.UI.Model.PS.CNFHService.PS_MSG res = psModels.CNFH.UpdateNetwork(networkList);
     return(Newtonsoft.Json.JsonConvert.SerializeObject(res));
 }