示例#1
0
        private void LoadData(string hccd)
        {
            pshctcfgBll bll = new pshctcfgBll();

            tpshctcfg cfg = bll.GetSelectedObject <tpshctcfg>(new List <ColumnInfo>()
            {
                new ColumnInfo()
                {
                    ColumnName = "hccd", ColumnValue = hccd
                }
            });

            tstdefcfg xdef = bll.GetSelectedObject <tstdefcfg>(new List <ColumnInfo>()
            {
                new ColumnInfo()
                {
                    ColumnName = "dfnm", ColumnValue = cfg.xdef
                }
            });

            tstdefcfg ydef = bll.GetSelectedObject <tstdefcfg>(new List <ColumnInfo>()
            {
                new ColumnInfo()
                {
                    ColumnName = "dfnm", ColumnValue = cfg.ydef
                }
            });

            ValueInfoBll     dd   = new ValueInfoBll();
            List <ValueInfo> lstX = typeof(ValueInfoBll).GetMethod(xdef.dasc).Invoke(dd, new object[] { }) as List <ValueInfo>;
            List <ValueInfo> lstY = typeof(ValueInfoBll).GetMethod(ydef.dasc).Invoke(dd, new object[] { }) as List <ValueInfo>;

            //Build Grid Header
            //BuildGridHeader(lstX);

            rphctctlBll rpbll  = new rphctctlBll();
            string      strXML = rpbll.GetData(hccd, cfg, xdef, ydef, lstX, lstY);

            DataSet ds = new DataSet();

            XmlReader reader = XmlReader.Create(new System.IO.StringReader(strXML));

            ds.ReadXml(reader);
            this.GridView1.DataSource = ds;
            this.GridView1.DataBind();

            //GroupRows(this.GridView1, 0);
            MergeGridView mergeGV = new MergeGridView();

            mergeGV.Merge(this.GridView1, 0);
        }
示例#2
0
        public void exportExcel()
        {
            try
            {
                string      record = this.Request["record"];
                pshctvalBll bll    = new pshctvalBll();

                tpshctcfg cfg = bll.GetSelectedObject <tpshctcfg>(new List <ColumnInfo>()
                {
                    new ColumnInfo()
                    {
                        ColumnName = "hccd", ColumnValue = record
                    }
                });

                tstdefcfg xdef = bll.GetSelectedObject <tstdefcfg>(new List <ColumnInfo>()
                {
                    new ColumnInfo()
                    {
                        ColumnName = "dfnm", ColumnValue = cfg.xdef
                    }
                });

                tstdefcfg ydef = bll.GetSelectedObject <tstdefcfg>(new List <ColumnInfo>()
                {
                    new ColumnInfo()
                    {
                        ColumnName = "dfnm", ColumnValue = cfg.ydef
                    }
                });

                ValueInfoBll     dd   = new ValueInfoBll();
                List <ValueInfo> lstX = typeof(ValueInfoBll).GetMethod(xdef.dasc).Invoke(dd, new object[] { }) as List <ValueInfo>;
                List <ValueInfo> lstY = typeof(ValueInfoBll).GetMethod(ydef.dasc).Invoke(dd, new object[] { }) as List <ValueInfo>;

                List <List <ColumnInfo> > lstResult = bll.GetHeadCountCfgValue(record, cfg, lstX, lstY);

                if (lstResult != null)
                {
                    UtilExcel.ExportToExcel(Response, this.GetType().Name, lstResult);
                }
            }
            catch (Exception ex)
            {
                string message = "{status:'failure',msg:'" + ExceptionPaser.Parse(HRMSRes.Public_Message_QueryFail, ex, true) + "'}";
                Response.Output.Write(message);
            }
        }
示例#3
0
        public void list()
        {
            string      record = this.Request["record"];
            pshctvalBll bll    = new pshctvalBll();

            tpshctcfg cfg = bll.GetSelectedObject <tpshctcfg>(new List <ColumnInfo>()
            {
                new ColumnInfo()
                {
                    ColumnName = "hccd", ColumnValue = record
                }
            });

            tstdefcfg xdef = bll.GetSelectedObject <tstdefcfg>(new List <ColumnInfo>()
            {
                new ColumnInfo()
                {
                    ColumnName = "dfnm", ColumnValue = cfg.xdef
                }
            });

            tstdefcfg ydef = bll.GetSelectedObject <tstdefcfg>(new List <ColumnInfo>()
            {
                new ColumnInfo()
                {
                    ColumnName = "dfnm", ColumnValue = cfg.ydef
                }
            });

            ValueInfoBll     dd   = new ValueInfoBll();
            List <ValueInfo> lstX = typeof(ValueInfoBll).GetMethod(xdef.dasc).Invoke(dd, new object[] { }) as List <ValueInfo>;
            List <ValueInfo> lstY = typeof(ValueInfoBll).GetMethod(ydef.dasc).Invoke(dd, new object[] { }) as List <ValueInfo>;

            List <List <ColumnInfo> > lstResult = bll.GetHeadCountCfgValue(record, cfg, lstX, lstY);
            int total = lstResult.Count;

            string json = ConvertToJson(lstResult);

            Response.Write("{results:" + total + ",rows:" + json + "}");

            //ViewData["hctconfig"] = responseJson(lstResult,lstX,lstY);
        }
示例#4
0
        public void load()
        {
            string      record = this.Request["record"];
            pshctvalBll bll    = new pshctvalBll();

            tpshctcfg cfg = bll.GetSelectedObject <tpshctcfg>(new List <ColumnInfo>()
            {
                new ColumnInfo()
                {
                    ColumnName = "hccd", ColumnValue = record
                }
            });

            tstdefcfg xdef = bll.GetSelectedObject <tstdefcfg>(new List <ColumnInfo>()
            {
                new ColumnInfo()
                {
                    ColumnName = "dfnm", ColumnValue = cfg.xdef
                }
            });

            tstdefcfg ydef = bll.GetSelectedObject <tstdefcfg>(new List <ColumnInfo>()
            {
                new ColumnInfo()
                {
                    ColumnName = "dfnm", ColumnValue = cfg.ydef
                }
            });

            ValueInfoBll     dd   = new ValueInfoBll();
            List <ValueInfo> lstX = typeof(ValueInfoBll).GetMethod(xdef.dasc).Invoke(dd, new object[] { }) as List <ValueInfo>;
            List <ValueInfo> lstY = typeof(ValueInfoBll).GetMethod(ydef.dasc).Invoke(dd, new object[] { }) as List <ValueInfo>;

            string message = "{status:'success',msg:'" + responseJson(record, lstX, lstY).Replace("'", "\\'") + "'}";

            Response.Write(message);
        }