Exemple #1
0
        private roleCls GetroleCls(string str)
        {
            roleCls ro = new roleCls();

            if (str != "[]")
            {
                JObject jo = JsonHelpClass.JsonStringToJObject(str);
                ro.mfunc       = int.Parse(jo["mfunc"].ToString());
                ro.otherParams = jo["otherParams"].ToString();
            }
            return(ro);
        }
Exemple #2
0
        private UserInfoModel GetUserInfoModel(string str)
        {
            UserInfoModel model = new UserInfoModel();

            if (str != "[]")
            {
                JObject jo = JsonHelpClass.JsonStringToJObject(str);
                //model.usercode = jo["usercode"].ToString();
                model.username = jo["username"].ToString();
            }

            return(model);
        }
Exemple #3
0
        private List <hardwarectrlCls> GetListhardwarectrlCls(string str)
        {
            List <hardwarectrlCls> list = new List <hardwarectrlCls>();

            if (str != "[]")
            {
                JObject         jo  = JsonHelpClass.JsonStringToJObject(str);
                hardwarectrlCls cls = new hardwarectrlCls();
                cls.name  = jo["name"].ToString();
                cls.check = jo["check"].ToString();
                cls.roles = GetroleCls(jo["roles"].ToString());
                list.Add(cls);
            }
            return(list);
        }
Exemple #4
0
        private List <ButtonMemu> GetListButtonmemu(string str)
        {
            List <ButtonMemu> list = new List <ButtonMemu>();

            if (str != "[]")
            {
                JObject    jo   = JsonHelpClass.JsonStringToJObject(str);
                ButtonMemu memu = new ButtonMemu();
                memu.Resourcecode = jo["resourcecode"].ToString();
                memu.Resourcename = jo["resourcename"].ToString();
                memu.Resourcetype = jo["resourcetype"].ToString();
                memu.Resourcememo = jo["resourcememo"].ToString();
                list.Add(memu);
            }
            return(list);
        }
Exemple #5
0
        private List <flagMsg> GetListFlagmsg(string str)
        {
            List <flagMsg> list = new List <flagMsg>();

            if (str != "[]")
            {
                JObject jo = JsonHelpClass.JsonStringToJObject(str);
                flagMsg fs = new flagMsg();
                fs.Msg     = jo["msg"].ToString();
                fs.success = (bool)jo["success"];
                fs.flag    = int.Parse(jo["flag"].ToString());
                fs.list    = GetListBullinfo(jo["list"].ToString());
                fs.count   = int.Parse(jo["count"].ToString());
                list.Add(fs);
            }
            return(list);
        }
Exemple #6
0
        private LoginServiceModel GetLoginServiceModel(string str)
        {
            LoginServiceModel lg = new LoginServiceModel();

            try
            {
                JObject jo = JsonHelpClass.JsonStringToJObject(str);
                lg.success = (bool)jo["success"];
                lg.msg     = jo["msg"].ToString();
                //lg.mtype = jo["mtype"].ToString();
                lg.data  = GetListModule(jo["data"].ToString());
                lg.total = int.Parse(jo["total"].ToString());
                lg.mfunc = int.Parse(jo["mfunc"].ToString());
                lg.flags = GetListFlagmsg(jo["flags"].ToString());
                lg.rows  = GetListBullinfo(jo["rows"].ToString());
                //lg.hardwarectrl = GetListhardwarectrlCls(jo["hardwarectrl"].ToString());
                lg.more = GetUserInfoModel(jo["more"].ToString());
            }
            catch (Exception ex)
            {
            }
            return(lg);
        }
Exemple #7
0
        private List <BullInfo> GetListBullinfo(string str)
        {
            List <BullInfo> list = new List <BullInfo>();

            if (str != "[]")
            {
                JObject  jo   = JsonHelpClass.JsonStringToJObject(str);
                BullInfo info = new BullInfo();
                info.recordtype         = jo["recordtype"].ToString();
                info.rfid               = jo["rfid"].ToString();
                info.rfidid             = jo["rfidid"].ToString();
                info.rfidtype           = jo["rfidtype"].ToString();
                info.ruleflag           = int.Parse(jo["ruleflag"].ToString());
                info.basket             = jo["basket"].ToString();
                info.batchcode          = jo["batchcode"].ToString();
                info.bflag              = int.Parse(jo["bflag"].ToString());
                info.caller             = jo["caller"].ToString();
                info.carno              = jo["carno"].ToString();
                info.clientid           = jo["clientid"].ToString();
                info.deduction          = decimal.Parse(jo["deduction"].ToString());
                info.deduction2         = decimal.Parse(jo["deduction2"].ToString());
                info.deductioncode      = jo["deductioncode"].ToString();
                info.deductionname      = jo["deductionname"].ToString();
                info.deductionoperacode = jo["deductionoperacode"].ToString();
                info.deductionoperaname = jo["deductionoperaname"].ToString();
                info.deductiontime      = jo["deductiontime"].ToString();
                info.dflag              = int.Parse(jo["dflag"].ToString());
                info.dvalue             = double.Parse(jo["dvalue"].ToString());
                info.flag               = int.Parse(jo["flag"].ToString());
                info.gflag              = int.Parse(jo["gflag"].ToString());
                info.gross              = decimal.Parse(jo["gross"].ToString());
                info.grossb             = decimal.Parse(jo["grossb"].ToString());
                info.grossgroupno       = jo["grossgroupno"].ToString();
                info.grosslogid         = jo["grosslogid"].ToString();
                info.grosslogidb        = jo["grosslogidb"].ToString();
                info.grossoperacode     = jo["grossoperacode"].ToString();
                info.grossoperacodeb    = jo["grossoperacodeb"].ToString();
                info.grossoperaname     = jo["grossoperaname"].ToString();
                info.grossoperanameb    = jo["grossoperanameb"].ToString();
                info.grossserial        = int.Parse(jo["grossserial"].ToString());
                info.grosstime          = jo["grosstime"].ToString();
                info.grosstimeb         = jo["grosstimeb"].ToString();
                info.grossweigh         = jo["grossweigh"].ToString();
                info.grossweighb        = jo["grossweighb"].ToString();
                info.grossweighgroup    = jo["grossweighgroup"].ToString();
                info.grossweighid       = jo["grossweighid"].ToString();
                info.grossweighidb      = jo["grossweighidb"].ToString();
                info.icid               = jo["icid"].ToString();
                info.matchid            = jo["matchid"].ToString();
                info.matchidb           = jo["matchidb"].ToString();
                info.materialcode       = jo["materialcode"].ToString();
                info.materialcount      = int.Parse(jo["materialcount"].ToString());
                info.materialname       = jo["materialname"].ToString();
                info.materialspec       = jo["materialspec"].ToString();
                info.materialspeccode   = jo["materialspeccode"].ToString();
                info.measurestate       = jo["measurestate"].ToString();
                info.mflag              = int.Parse(jo["mflag"].ToString());
                info.mtypes             = jo["mtypes"].ToString();
                info.operaname          = jo["operaname"].ToString();
                info.operatype          = jo["operatype"].ToString();
                info.planid             = jo["planid"].ToString();
                info.planweight         = decimal.Parse(jo["planweight"].ToString());
                info.sflag              = int.Parse(jo["sflag"].ToString());
                info.ship               = jo["ship"].ToString();
                info.shipcode           = jo["shipcode"].ToString();
                info.snumber            = int.Parse(jo["snumber"].ToString());
                info.sourcecode         = jo["sourcecode"].ToString();
                info.sourcename         = jo["sourcename"].ToString();
                info.sourceplace        = jo["sourceplace"].ToString();
                info.suttle             = decimal.Parse(jo["suttle"].ToString());
                info.suttleapp          = decimal.Parse(jo["suttleapp"].ToString());
                info.suttleb            = decimal.Parse(jo["suttleb"].ToString());
                info.suttleoperacode    = jo["suttleoperacode"].ToString();
                info.suttleoperaname    = jo["suttleoperaname"].ToString();
                info.suttletime         = jo["suttletime"].ToString();
                info.suttleweigh        = jo["suttleweigh"].ToString();
                info.suttleweighid      = jo["suttleweighid"].ToString();
                info.sysmemo            = jo["sysmemo"].ToString();
                info.tare               = decimal.Parse(jo["tare"].ToString());
                info.tareb              = decimal.Parse(jo["tareb"].ToString());
                info.taregroupno        = decimal.Parse(jo["taregroupno"].ToString());
                info.tarelogid          = jo["tarelogid"].ToString();
                info.tarelogidb         = jo["tarelogidb"].ToString();
                info.tareoperacode      = jo["tareoperacode"].ToString();
                info.tareoperacodeb     = jo["tareoperacodeb"].ToString();
                info.tareoperaname      = jo["tareoperaname"].ToString();
                info.tareoperanameb     = jo["tareoperanameb"].ToString();
                info.tareserial         = decimal.Parse(jo["tareserial"].ToString());
                info.tarespeed          = decimal.Parse(jo["tarespeed"].ToString());
                info.taretime           = jo["taretime"].ToString();
                info.taretimeb          = jo["taretimeb"].ToString();
                info.tareweigh          = jo["tareweigh"].ToString();
                info.tareweighb         = jo["tareweighb"].ToString();
                info.tareweighgroup     = jo["tareweighgroup"].ToString();
                info.tareweighid        = jo["tareweighid"].ToString();
                info.tareweighidb       = jo["tareweighidb"].ToString();
                info.usermemo           = jo["usermemo"].ToString();
                info.targetcode         = jo["targetcode"].ToString();
                info.targetname         = jo["targetname"].ToString();
                info.targetplace        = jo["targetplace"].ToString();
                info.taskcode           = jo["taskcode"].ToString();
                list.Add(info);
            }
            return(list);
        }