Ejemplo n.º 1
0
        public bool Login(Model.sa_t_operator_i oper)
        {
            JsonRequest r = new JsonRequest();

            r.Write("oper_id", oper.oper_id);
            r.Write("pwd", oper.oper_pw);

            r.request("/oper?t=login");

            if (!r.ReadSuccess())
            {
                throw new Exception(r.ReadMessage());
            }

            oper.oper_name = r.Read("oper_name");
            oper.oper_type = r.Read("oper_type");

            Appsetting.oper_types  = r.GetDicOfTable <string, sys_t_oper_type>("type_id");
            Appsetting.oper_grants = r.GetDicOfTable <string, sa_t_oper_grant>("func_id", "data2");

            return(true);
        }
Ejemplo n.º 2
0
        Dictionary <string, Model.sys_t_oper_type> IMyDestop.GetDic()
        {
            JsonRequest r = new JsonRequest();

            r.request("/mydestop?t=GetAll");

            if (!r.ReadSuccess())
            {
                throw new Exception(r.ReadMessage());
            }

            Dictionary <string, sys_t_oper_type> dic = r.GetDicOfTable <string, sys_t_oper_type>("type_id");

            return(dic);
        }
Ejemplo n.º 3
0
        public Dictionary <string, sys_t_print_style> GetStyleDic(sys_t_print_style style)
        {
            JsonRequest r = new JsonRequest();

            r.Write("style", style);

            r.request("/print?t=GetAll");

            if (!r.ReadSuccess())
            {
                throw new Exception(r.ReadMessage());
            }

            Dictionary <string, sys_t_print_style> style_dic = r.GetDicOfTable <string, sys_t_print_style>("style_id");

            return(style_dic);
        }
Ejemplo n.º 4
0
        public Dictionary <string, sys_t_print_style_data> GetPrintStyleData(string style_data)
        {
            JsonRequest r = new JsonRequest();

            r.Write("style_data", style_data);

            r.request("/print?t=GetPrintStyleData");

            if (!r.ReadSuccess())
            {
                throw new Exception(r.ReadMessage());
            }

            Dictionary <string, sys_t_print_style_data> dic = r.GetDicOfTable <string, sys_t_print_style_data>("style_data");

            return(dic);
        }