无为清净楼资源网 Design By www.qnjia.com

1. 水晶易表不能识别WS接口返回的DataTable或DataSet数据类型,会提示“无法加载URL”

3. C#调用Oracle的Package,并返回数据列表

2. 经查证,可以接受string类型的,如果需要返回数据列表,那么需要借助数组来返回,代码实现如下:
复制代码 代码如下:
public WeekSale_Table GetData(string skc1, string skc2, string week1, string week2, string week3, string week4)
        {
            try
            {
         //C#调用Oracle的包,返回数据列表
                OracleConnection orcn = new OracleConnection(ConfigurationManager.AppSettings["SAPBI"].ToString());
                OracleCommand cmd = new OracleCommand("pkg_cx_Productlifecycle.skcweeksale", orcn);
                cmd.CommandType = CommandType.StoredProcedure;
                OracleParameter ip0 = new OracleParameter("skc1", OracleType.VarChar);
                OracleParameter ip1 = new OracleParameter("skc2", OracleType.VarChar);
                OracleParameter ip2 = new OracleParameter("week1", OracleType.VarChar);
                OracleParameter ip3 = new OracleParameter("week2", OracleType.VarChar);
                OracleParameter ip4 = new OracleParameter("week3", OracleType.VarChar);
                OracleParameter ip5 = new OracleParameter("week4", OracleType.VarChar);

                ip0.Value = skc1;
                ip1.Value = skc2;
                ip2.Value = week1;
                ip3.Value = week2;
                ip4.Value = week3;
                ip5.Value = week4;

                cmd.Parameters.Add(ip0);
                cmd.Parameters.Add(ip1);
                cmd.Parameters.Add(ip2);
                cmd.Parameters.Add(ip3);
                cmd.Parameters.Add(ip4);
                cmd.Parameters.Add(ip5);

                OracleParameter p1 = new OracleParameter("p_rc", OracleType.Cursor);
                p1.Direction = System.Data.ParameterDirection.Output;
                cmd.Parameters.Add(p1);

                OracleDataAdapter command = new OracleDataAdapter(cmd);
                DataSet ds = new DataSet();
                command.Fill(ds, "Table");
                DataTable dt = ds.Tables["Table"];
                WeekSale_Table wt = new WeekSale_Table();
                wt.row = new WeekSale_Row[dt.Rows.Count];
                int rcount = dt.Rows.Count;
                for (int i = 0; i < rcount; i++)
                {
                    DataRow dr = dt.Rows[i];
                    WeekSale_Row row = new WeekSale_Row();
                    row.DISCOUNT1 = dr["DISCOUNT1"].ToString();
                    row.DISCOUNT2 = dr["DISCOUNT2"].ToString();
                    row.FCALCSUMS1 = dr["FCALCSUMS1"].ToString();
                    row.FCALCSUMS2 = dr["FCALCSUMS2"].ToString();
                    row.NUMS1 = dr["NUMS1"].ToString();
                    row.NUMS2 = dr["NUMS2"].ToString();
                    row.SKC1 = dr["SKC1"].ToString();
                    row.SKC2 = dr["SKC2"].ToString();
                    row.WEEK = dr["WEEK"].ToString();
                    row.WEEKS = dr["WEEKS"].ToString();
                    wt.row[i] = row;
                }
                return wt;
            }
            catch
            {
                return null;
            }
        }

复制代码 代码如下:
//定义Row,一行
public class WeekSale_Row
    {
        public string WEEKS;
        public string SKC1;
        public string SKC2;
        public string FCALCSUMS1;
        public string FCALCSUMS2;
        public string NUMS1;
        public string NUMS2;
        public string DISCOUNT1;
        public string DISCOUNT2;
        public string WEEK;
    }

//定义Table
public class WeekSale_Table
    {
        public WeekSale_Row[] row;
    }

标签:
webservice,数据集合

无为清净楼资源网 Design By www.qnjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
无为清净楼资源网 Design By www.qnjia.com

RTX 5090要首发 性能要翻倍!三星展示GDDR7显存

三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。

首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。

据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。