Exemplo n.º 1
0
    public static string FilterRQMTSets(int RQMTSetID, string RQMTSetName, int WTS_SYSTEMID, int WorkAreaID, int RQMTTypeID)
    {
        var result = WTSPage.CreateDefaultResult();

        if (RQMTSetID < 0)
        {
            RQMTSetID = 0;
        }

        // when results from back from the server, they come back as a data set containing the following tables:
        // [0] = RQMT
        // [1] = DESC
        // [2] = FUNC
        // [3] = DEFECT
        // [4] = TASK
        DataSet ds = RQMT.RQMTBuilder_Data_Get(RQMTSetID, !string.IsNullOrWhiteSpace(RQMTSetName) ? RQMTSetName : null, WTS_SYSTEMID, WorkAreaID, RQMTTypeID, 0);

        return(WTSPage.SerializeResult(ds));
    }
Exemplo n.º 2
0
    private void ReadQueryString()
    {
        if (Request.QueryString["Type"] != null && !string.IsNullOrWhiteSpace(Request.QueryString["Type"]))
        {
            this.Type = Request.QueryString["Type"];
        }

        Int32.TryParse(Request.QueryString["SystemSuiteID"], out DefaultSystemSuiteID);
        Int32.TryParse(Request.QueryString["WTS_SYSTEMID"], out DefaultSystemID);
        Int32.TryParse(Request.QueryString["WorkAreaID"], out DefaultWorkAreaID);
        Int32.TryParse(Request.QueryString["RQMTTypeID"], out DefaultRQMTTypeID);
        Int32.TryParse(Request.QueryString["RQMTSetRQMTSystemID"], out DefaultRQMTSet_RQMTSystemID);
        Int32.TryParse(Request.QueryString["RQMTID"], out DefaultRQMTID);
        Int32.TryParse(Request.QueryString["RQMTSetID"], out DefaultRQMTSetID);

        if (DefaultRQMTSet_RQMTSystemID != 0)
        {
            // note, this data set contains the following tables:
            // [0] = RQMT
            // [1] = DESC
            // [2] = FUNC
            DataSet ds = RQMT.RQMTBuilder_Data_Get(0, null, 0, 0, 0, DefaultRQMTSet_RQMTSystemID);

            if (ds.Tables.Count > 0 && ds.Tables["RQMT"].Rows.Count > 0)
            {
                DataRow row = ds.Tables["RQMT"].Rows[0];

                DefaultSystemID      = (int)row["WTS_SYSTEMID"];
                DefaultWorkAreaID    = (int)row["WorkAreaID"];
                DefaultSystemSuiteID = (int)row["WTS_SYSTEM_SUITEID"];
                DefaultRQMTTypeID    = (int)row["RQMTTypeID"];
                DefaultRQMTSetID     = (int)row["RQMTSetID"];
                DefaultRQMTSetName   = (string)row["RQMTSetName"];
            }
        }
        else if (DefaultRQMTSetID != 0)
        {
            DataSet ds = RQMT.RQMTBuilder_Data_Get(DefaultRQMTSetID, null, 0, 0, 0, 0);

            if (ds.Tables.Count > 0 && ds.Tables["RQMT"].Rows.Count > 0)
            {
                DataRow row = ds.Tables["RQMT"].Rows[0];

                DefaultSystemID      = (int)row["WTS_SYSTEMID"];
                DefaultWorkAreaID    = (int)row["WorkAreaID"];
                DefaultSystemSuiteID = (int)row["WTS_SYSTEM_SUITEID"];
                DefaultRQMTTypeID    = (int)row["RQMTTypeID"];
                DefaultRQMTSetName   = (string)row["RQMTSetName"];
            }
        }
        else if (DefaultSystemSuiteID == 0 && DefaultSystemID != 0)
        {
            DataTable dt = MasterData.WorkArea_SystemList_Get(DefaultWorkAreaID, DefaultSystemID);
            if (dt.Rows.Count > 0)
            {
                foreach (DataRow row in dt.Rows)
                {
                    int wasysid = (int)row["WorkArea_SystemID"];

                    if (wasysid != 0)
                    {
                        DefaultSystemSuiteID = (int)row["WTS_SYSTEM_SUITEID"];

                        break;
                    }
                }
            }
        }
    }