示例#1
0
 public string UpdateBusket(string sqlFrom)
 {
     try
     {
         return(WrappingManager.UpdateBusket(sqlFrom));
     }
     catch (Exception ex)
     {
         return(ex.StackTrace);
     }
 }
示例#2
0
 public string GetItemInfoByItemNo(string sqlFrom, string whereClause, string selectedFields)
 {
     try
     {
         return(WrappingManager.GetItemInfoByItemNo(sqlFrom, whereClause, selectedFields));
     }
     catch (Exception ex)
     {
         return(ex.StackTrace);
     }
 }
示例#3
0
 public string GetListItemInfo(string sqlFrom, string whereClause, string rep_code, string listName, string selectedFields)
 {
     try
     {
         return(WrappingManager.GetListItemInfo(sqlFrom, whereClause, rep_code, listName, selectedFields));
     }
     catch (Exception ex)
     {
         return(ex.StackTrace);
     }
 }
示例#4
0
 public string GetAvailableListQueryPair(string sqlFrom, string whereClause, string rep_code)
 {
     try
     {
         return(WrappingManager.GetAvailableListQueryPair(sqlFrom, whereClause, rep_code));
     }
     catch (Exception ex)
     {
         return(ex.StackTrace);
     }
 }
示例#5
0
 public string GetPartListInfo(string sqlFrom, string whereClause, string rep_code)
 {
     try
     {
         return(WrappingManager.GetPartlistInfo(sqlFrom, whereClause, rep_code));
     }
     catch (Exception ex)
     {
         return(ex.StackTrace);
     }
 }
示例#6
0
 public string GetReportConfigInfo(string rep_code)
 {
     try
     {
         return(WrappingManager.GetReportConfigInfo(rep_code));
     }
     catch (Exception ex)
     {
         return(ex.StackTrace);
     }
 }
示例#7
0
 public string GetBaseMaterialDetail(string keyNameValues, string rep_code)
 {
     try
     {
         keyNameValues = Microsoft.JScript.GlobalObject.unescape(keyNameValues);
         return(WrappingManager.GetBaseMaterialDetail(keyNameValues, rep_code));
     }
     catch (Exception ex)
     {
         return(ex.StackTrace);
     }
 }
示例#8
0
    public string GetInfoForThisFile(string viewName, string fileName)
    {
        string message = string.Empty;

        try
        {
            message = WrappingManager.GetInfoForThisFile(viewName, fileName);
        }
        catch (Exception ex)
        {
            message = "error";
        }

        return(message);
    }
示例#9
0
        protected override IEnumerator Bootstrap()
        {
            Debug.Log("Init Phase");

            yield return(null);

            Manager <TickManager> .Initialize();

            WrappingManager <WrappingManagerExample, NameProvider> .Initialize();

            yield return(null);

            Debug.Log("Final Phase");

            yield return(null);
        }
示例#10
0
    public DataSet GetReportCodes()
    {
        DataSet   ds = new DataSet();
        DataTable dt = new DataTable("reportTable");

        try
        {
            dt = WrappingManager.GetReportCodeList();
            ds.Tables.Add(dt);
            return(ds);
        }
        catch (Exception ex)
        {
            ds.Tables.Add(dt);
            return(ds);
        }
    }
示例#11
0
    private void ProcessDeepLink()
    {
        //http://localhost/obrowser/default.aspx?report=ARCHIEF&tab=1&internalid=2
        //http://localhost/obrowser/default.aspx??report=tasks&tab=1&task_id='972'
        //http://localhost/obrowser/default.aspx??report=Archive (full)&tab=1&task_id='972'

        string queryString = Request.Cookies["queryString"].Value.ToLower();

        if (queryString == "")
        {
            queryString = Request.QueryString.ToString().ToLower();
        }

        if (queryString.IndexOf("report") > -1 && queryString.IndexOf("tab") > -1)
        {
            string[] queryParts = queryString.Split('&');
            for (int k = 0; k < queryParts.Length; k++)
            {
                if (k == 0 && !string.IsNullOrEmpty(queryParts[k]))
                {
                    deepLinkReport = queryParts[k].Split('=')[1];
                }
                else if (k == 1)
                {
                    tab = queryParts[k].Split('=')[1];
                }
                else
                {
                    string[] clauseParts = queryParts[k].Split('=');
                    whereClause += clauseParts[0] + "='" + clauseParts[1] + "'";
                    if (k < queryParts.Length - 1)
                    {
                        whereClause += " AND ";
                    }
                }
            }

            deepLinkStatus = WrappingManager.ValidateDeepLink(ref deepLinkReport, whereClause);
            //whereClause = Server.UrlEncode(whereClause);
            //whereClause = Server.UrlEncode(whereClause);
        }
        Response.Cookies["queryString"].Value = "";
    }
示例#12
0
        public bool UpdateUserDefinedReportSettings(string REPORT_CODE, string SQL_WHERE, string GROUP_BY, string ORDER_BY, string ORDER_BY_DIR, string report_settings)
        {
            bool isUpdated = false;

            try
            {
                //*** decode ecoded single quite(') to char
                REPORT_CODE     = Microsoft.JScript.GlobalObject.unescape(REPORT_CODE);
                SQL_WHERE       = Microsoft.JScript.GlobalObject.unescape(SQL_WHERE);
                GROUP_BY        = Microsoft.JScript.GlobalObject.unescape(GROUP_BY);
                ORDER_BY        = Microsoft.JScript.GlobalObject.unescape(ORDER_BY);
                ORDER_BY_DIR    = Microsoft.JScript.GlobalObject.unescape(ORDER_BY_DIR);
                report_settings = Microsoft.JScript.GlobalObject.unescape(report_settings);
                isUpdated       = WrappingManager.UpdateUserDefinedReportSettings(REPORT_CODE, SQL_WHERE, GROUP_BY, ORDER_BY, ORDER_BY_DIR, report_settings);
            }
            catch (Exception ex)
            {
                return(isUpdated);
            }
            return(isUpdated);
        }
示例#13
0
 public string InsertGroupColor(string REPORT_CODE, string GROUP_BY, string GROUP_CODE, string COLOR_CODE)
 {
     try
     {
         //*** decode ecoded single quite(') to char
         //SQL_WHERE = Microsoft.JScript.GlobalObject.unescape(SQL_WHERE);
         bool   result = WrappingManager.InsertGroupColor(REPORT_CODE, GROUP_BY, GROUP_CODE, COLOR_CODE);
         string value  = string.Empty;
         if (result)
         {
             value = "{\"result\":\"true\"}";
         }
         else
         {
             value = "{\"result\":\"false\"}";
         }
         return(value);
     }
     catch (Exception ex)
     {
         return(ex.StackTrace);
         //return false;
     }
 }
示例#14
0
 public bool DeleteReport(string rep_code)
 {
     return(WrappingManager.DeleteReport(rep_code));
 }
示例#15
0
 public bool CheckForReportCodeAvailability(string rep_code)
 {
     return(WrappingManager.CheckForReportCodeAvailability(rep_code));
 }
示例#16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string selectSql       = string.Empty;
        string docName         = string.Empty;
        string reportcode      = Request.QueryString["reportcode"];
        string reportExtension = Request.QueryString["repExtension"].ToLower();
        string artCode         = string.Empty;
        string revision        = string.Empty;

        if (Request.QueryString["listName"] != null)
        {
            artCode = Request.QueryString["artCode"];
            string listName = Request.QueryString["listName"];
            artCode = artCode.Split(':')[1].Trim();
            docName = artCode + "_" + listName;
            string sqlFrom     = Request.QueryString["sqlFrom"];
            string whereClause = Request.QueryString["whereClause"].Replace("-", "%");
            selectSql = WrappingManager.GetListQueryByListName(sqlFrom, whereClause, reportcode, listName);
        }
        else
        {
            string table       = Request.QueryString["table"].Replace("@@@", "\"");
            string fields      = Request.QueryString["fields"];
            string whereclause = Request.QueryString["whereclause"].Replace("-", "%");
            string groupby     = Request.QueryString["groupby"];
            string orderby     = Request.QueryString["orderby"];
            docName = reportcode;

            if (table != "" && fields != "")
            {
                selectSql = " select " + fields + " from " + table;

                if (whereclause != "")
                {
                    selectSql = selectSql + " where " + whereclause + " ";
                }


                if (groupby.ToUpper() != "NONE" && groupby != "")
                {
                    selectSql = selectSql + " order by " + groupby;
                }


                if (orderby != "")
                {
                    if (selectSql.ToLower().Contains("order by"))
                    {
                        selectSql = selectSql + " , " + orderby;
                    }
                    else
                    {
                        selectSql = selectSql + " order by " + orderby;
                    }
                }
            }
        }

        HIT.OB.STD.Core.BLL.DBManagerFactory Factory     = new HIT.OB.STD.Core.BLL.DBManagerFactory();
        HIT.OB.STD.Core.DAL.IOBFunctions     obFunctions = Factory.GetDBManager(reportcode);

        DataTable dt = obFunctions.GetDataTable(selectSql);

        if (reportExtension.Equals("xls"))
        {
            ExportExcel(dt, docName);
        }
        else if (reportExtension.Equals("csv"))
        {
            ExportCSV(dt, docName);
        }
    }
示例#17
0
    private void PrintReportForList()
    {
        string username    = "******";
        string titel       = "null";
        string showfilter  = "null";
        string curdate     = "null";
        string paperformat = string.Empty;
        string papersize   = string.Empty;
        string table       = string.Empty;
        string whereclause = string.Empty;
        string reporttype  = string.Empty;
        string fieldswidth = string.Empty;
        string groupby     = "NONE";

        string securityKey = string.Empty;

        string       selectSql          = string.Empty;
        string       countSql           = string.Empty;
        string       gbselectexpression = string.Empty;
        string       reportCode         = string.Empty;
        EPageSize    EpageSize;
        EPaperFormat EpaperFormat;

        string artCode = string.Empty;

        reportCode = Request.QueryString["reportcode"];
        artCode    = Request.QueryString["artCode"];
        string listName = Request.QueryString["listName"];

        artCode = artCode.Split(':')[1].Trim();
        string docName = artCode + "_" + listName;

        table       = Request.QueryString["table"];
        whereclause = Request.QueryString["whereClause"];
        selectSql   = WrappingManager.GetListQueryByListName(table, whereclause, reportCode, listName);

        DBUtil.CONN_STRING = ConfigurationManager.ConnectionStrings["obcore_connectionstring"].ConnectionString;

        try
        {
            string   QueryStringUrl = Server.UrlDecode(Request.Url.Query.Substring(Request.Url.Query.IndexOf('?') + 1));
            string[] KeyValues      = QueryStringUrl.Split('&');

            for (int i = 0; i < KeyValues.Length; i++)
            {
                string[] KeyValuePair = KeyValues[i].Split('=');
                string   key          = KeyValuePair.Length > 0 ? KeyValuePair[0].Trim() : string.Empty;
                string   value        = KeyValues[i].Substring(KeyValues[i].IndexOf('=') + 1).Trim();

                switch (key)
                {
                case "username":
                    username = value;
                    break;

                case "securityKey":
                    securityKey = value;
                    break;

                case "titel":
                    titel = value;
                    break;

                case "showfilter":
                    showfilter = value;
                    break;

                case "curdate":
                    curdate = value;
                    break;

                case "paperformat":
                    paperformat = value;
                    break;

                case "papersize":
                    papersize = value;
                    break;

                case "reporttype":
                    reporttype = value.ToLower();
                    break;

                case "reportcode":
                    reportCode = value;
                    break;

                case "table":
                    table = value.Replace("@@@", "\"");
                    break;
                }
            }



            Dictionary <string, string> dicParams = new Dictionary <string, string>();

            username = username != "null" && securityKey != string.Empty ? "Static Name" : "null";

            dicParams.Add("username", username);
            dicParams.Add("titel", titel);

            showfilter = showfilter != "null" ? whereclause == string.Empty ? "De data wordt niet gefiltered"
                : whereclause
                : showfilter;
            dicParams.Add("showfilter", showfilter);
            dicParams.Add("curdate", curdate.Equals("null") == true ? "null" : DateTime.Now.ToString("dd/MM/yyyy"));

            switch (papersize)
            {
            case "a3":
                EpageSize = EPageSize.A3;
                break;

            case "a4":
                EpageSize = EPageSize.A4;
                break;

            default:
                EpageSize = EPageSize.A4;
                break;
            }

            switch (paperformat)
            {
            case "landscape":
                EpaperFormat = EPaperFormat.LandScape;
                break;

            case "portrait":
                EpaperFormat = EPaperFormat.Portrait;
                break;

            default:
                EpaperFormat = EPaperFormat.Portrait;
                break;
            }

            ReportUtil oReportUtil = new ReportUtil();

            ReportProperties data = oReportUtil.GetReportProperties(selectSql, fieldswidth, reportCode, dicParams, EpageSize, EpaperFormat, Server.MapPath(FileNameManager.PdfFileName));

            DataTable recordCountTableForEachGroup = oReportUtil.GetRecordCountForEachGroup(countSql, reportCode);

            switch (reporttype)
            {
            case "regular":
                oReportUtil.GenerateRegularReport(data, recordCountTableForEachGroup, Response);
                break;

            case "piechart":
            case "histogram":
                Dictionary <string, string> groupColors =
                    new ColorUtil().GetGroupColors(reportCode, recordCountTableForEachGroup, table, groupby);
                List <Group> oListGroup = new List <Group>();
                for (int i = 0; i < recordCountTableForEachGroup.Rows.Count; i++)
                {
                    Group oGroup = new Group();
                    oGroup.GroupValue  = double.Parse(recordCountTableForEachGroup.Rows[i][0].ToString());
                    oGroup.GroupName   = recordCountTableForEachGroup.Rows[i][groupby].ToString();
                    oGroup.GroupColour = XColor.FromArgb(System.Drawing.ColorTranslator.FromHtml("#" + groupColors[oGroup.GroupName]));
                    oListGroup.Add(oGroup);
                }

                if (reporttype.ToLower() == "piechart")
                {
                    oReportUtil.GeneratePieChart(data, Response, oListGroup);
                }
                else if (reporttype.ToLower() == "histogram")
                {
                    oReportUtil.GenerateColumnChart(data, Response, oListGroup, groupby);
                }
                break;

            default:
                oReportUtil.GenerateRegularReport(data, recordCountTableForEachGroup, Response);
                break;
            }
        }
        catch (Exception oEx)
        {
            Response.Write("Following server error occurs...<br/>");
            Response.Write("Select sql:" + selectSql + "<br/>");
            Response.Write("Count sql:" + countSql + "<br/>");
            Response.Write(oEx.Message + "<br/>");
            Response.Write(oEx.StackTrace);
        }
    }