コード例 #1
0
        protected string Change(string sBase, string sSource, string sSaveSource, string sSave, SrnprWeb.CommonFunction.ECMAScriptPackerWCF.PackerEncoding pe)
        {
            StringBuilder sb = new StringBuilder();

            foreach (string s in sSource.Split(','))
            {
                sb.Append(File.ReadAllText(sBase + s, System.Text.Encoding.Unicode));

            }

            File.WriteAllText(sBase + sSaveSource, sb.ToString(), System.Text.Encoding.Unicode);
            ECMAScriptPackerWCF p = new ECMAScriptPackerWCF(pe, true, false);
            string sReturn = p.Pack(sb.ToString()).Replace("\n", "\r\n");
            File.WriteAllText(sBase + sSave, sReturn, System.Text.Encoding.UTF8);

            return "成功";
        }
コード例 #2
0
        /// <summary>
        /// 
        /// Description: 返回附加的数据
        /// Author:Liudpc
        /// Create Date: 2010-8-27 10:38:44
        /// </summary>
        /// <param name="req"></param>
        /// <returns></returns>
        public Dictionary<int, SrnprWeb.WebEntity.WidgetProcessWWE> DicProcess(SrnprWeb.WebEntity.WidgetRequestWWE req)
        {
            Dictionary<int, SrnprWeb.WebEntity.WidgetProcessWWE> dic = new Dictionary<int, SrnprWeb.WebEntity.WidgetProcessWWE>();

            for (int i = 0, j = req.RQ.Count; i < j; i++)
            {

                switch (req.RQ[i].WidgetType)
                {

                    case "LS":

                        DataTable dtls = GetLSTableById(req.RQ[i].Id);

                        if (dtls != null)
                        {
                            dic[i] = new SrnprWeb.WebEntity.WidgetProcessWWE();
                            dic[i].DataInfo = dtls;
                        }

                        break;
                    case "GS":

                        DataTable dtgs = GetGSTableById(req.RQ[i].Id);

                        if (dtgs != null&&dtgs.Columns.Count>0)
                        {
                            dic[i] = new SrnprWeb.WebEntity.WidgetProcessWWE();
                            dic[i].DataInfo = dtgs;
                            dic[i].DataFlag = true;
                        }

                        break;
                }

            }
            return dic;
        }
コード例 #3
0
ファイル: GridShowWWP.cs プロジェクト: srnpr/srnprframework
 public SrnprWeb.WebInterface.WidgetResponseWWI GetResponse(SrnprWeb.WebInterface.WidgetRequestWWI req)
 {
     return GetResponse(req, null);
 }