Beispiel #1
0
        public void GetPrintStyleDefault(WebHelper w, Dictionary <string, object> kv)
        {
            sys_t_print_style_default style = w.GetObject <sys_t_print_style_default>("style");
            DataTable tb = bll.GetPrintStyleDefault(style);

            w.Write(tb);
        }
Beispiel #2
0
        public void DelDefault(sys_t_print_style_default style)
        {
            JsonRequest r = new JsonRequest();

            r.Write("style", style);

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

            if (!r.ReadSuccess())
            {
                throw new Exception(r.ReadMessage());
            }
        }
Beispiel #3
0
        public void DelDefault(sys_t_print_style_default style)
        {
            string sql = "select * from sys_t_print_style_default where report_id='" + style.report_id +
                         "' and oper_id='" + style.oper_id + "' ";
            var print_style = d.ExecuteToModel <sys_t_print_style_default>(sql, null);

            if (print_style == null)
            {
                throw new Exception("不存在样式");
            }

            d.ExecuteScalar("delete from sys_t_print_style_default where style_id='" + style.style_id + "' and oper_id='" + style.oper_id + "'", null);
        }
Beispiel #4
0
        public void UpdateDefault(sys_t_print_style_default style)
        {
            string sql = "select * from sys_t_print_style_default where report_id='" + style.report_id +
                         "' and oper_id='" + style.oper_id + "' ";
            var print_style = d.ExecuteToModel <sys_t_print_style_default>(sql, null);

            if (print_style == null)
            {
                throw new Exception("不存在样式");
            }

            d.Update(style, "oper_id,report_id");
        }
Beispiel #5
0
        public void AddDefault(sys_t_print_style_default style)
        {
            string sql = "select * from sys_t_print_style_default where report_id='" + style.report_id +
                         "' and oper_id='" + style.oper_id + "' ";
            var print_style = d.ExecuteToModel <sys_t_print_style_default>(sql, null);

            if (print_style != null)
            {
                UpdateDefault(style);
            }
            else
            {
                d.Insert(style);
            }
        }
Beispiel #6
0
        public DataTable GetPrintStyleDefault(sys_t_print_style_default style)
        {
            JsonRequest r = new JsonRequest();

            r.Write("style", style);

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

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

            DataTable tb = r.GetDataTable();

            return(tb);
        }
Beispiel #7
0
        public Dictionary <string, sys_t_print_style_default> GetDefaultDic(sys_t_print_style_default style)
        {
            JsonRequest r = new JsonRequest();

            r.Write("style", style);

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

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

            Dictionary <string, sys_t_print_style_default> style_dic = r.GetDicOfTable <string, sys_t_print_style_default>("report_id");

            return(style_dic);
        }
Beispiel #8
0
        public DataTable GetPrintStyleDefault(sys_t_print_style_default style)
        {
            string sql = "select * from sys_t_print_style_default where 1=1 ";

            if (!string.IsNullOrEmpty(style.report_id))
            {
                sql += " and report_id='" + style.report_id + "' ";
            }
            if (!string.IsNullOrEmpty(style.oper_id))
            {
                sql += " and oper_id='" + style.oper_id + "' ";
            }

            DataTable tb = d.ExecuteToTable(sql, null);

            return(tb);
        }
Beispiel #9
0
        public void DelDefault(WebHelper w, Dictionary <string, object> kv)
        {
            sys_t_print_style_default style = w.GetObject <sys_t_print_style_default>("style");

            bll.DelDefault(style);
        }