Esempio n. 1
0
    /// <summary>
    /// 设置标准阀值
    /// </summary>
    /// <returns></returns>
    public string GetEvaluItemData(string strConditonId)
    {
        string    reslut       = "";
        DataTable dtSt         = new DataTable();
        string    strSortname  = Request.Params["sortname"];
        string    strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);
        //dtEval = new TBaseEvaluationInfoLogic().SelectUnionByTable();
        TBaseEvaluationConItemVo objEvItem = new TBaseEvaluationConItemVo();

        objEvItem.CONDITION_ID = strConditonId;
        objEvItem.IS_DEL       = "0";
        objEvItem.SORT_FIELD   = strSortname;
        objEvItem.SORT_TYPE    = strSortorder;
        //dtSt = new TBaseEvaluationConItemLogic().SelectByTable(objEvItem,intPageIndex,intPageSize);
        //int intTotalCount = new TBaseEvaluationConItemLogic().GetSelectResultCount(objEvItem);
        dtSt = new TBaseEvaluationConItemLogic().GetEvaluItemDataDatable(objEvItem, intPageIndex, intPageSize);
        int intTotalCount = new TBaseEvaluationConItemLogic().GetEvaluItemDataDatableCount(objEvItem);

        reslut = LigerGridDataToJson(dtSt, intTotalCount);
        return(reslut);
    }
Esempio n. 2
0
    public static List <object> GetMonitorSubItems(string strStandId, string strCondtionId, string strMonitor)
    {
        List <object>            reslut = new List <object>();
        DataTable                dtSt   = new DataTable();
        TBaseEvaluationConItemVo objtd  = new TBaseEvaluationConItemVo();

        objtd.IS_DEL       = "0";
        objtd.MONITOR_ID   = strMonitor;
        objtd.STANDARD_ID  = strStandId;
        objtd.CONDITION_ID = strCondtionId;
        dtSt = new TBaseEvaluationConItemLogic().SelectByTable(objtd);

        DataTable       dt      = new DataTable();
        TBaseItemInfoVo objitem = new TBaseItemInfoVo();

        objitem.MONITOR_ID = strMonitor;
        objitem.IS_DEL     = "0";


        dt = new TBaseItemInfoLogic().SelectByTable(objitem);

        DataTable dtItem = new DataTable();

        dtItem = dt.Copy();
        dtItem.Clear();
        if (dtSt.Rows.Count > 0)
        {
            for (int i = 0; i < dtSt.Rows.Count; i++)
            {
                if (!String.IsNullOrEmpty(dtSt.Rows[i]["ITEM_ID"].ToString()))
                {
                    DataRow[] dr = dt.Select("ID='" + dtSt.Rows[i]["ITEM_ID"].ToString() + "'");
                    if (dr != null)
                    {
                        foreach (DataRow Temrow in dr)
                        {
                            Temrow.Delete();
                            dt.AcceptChanges();
                        }
                    }
                }
            }
        }

        dtItem = dt.Copy();
        reslut = LigerGridSelectDataToJson(dtItem, dtItem.Rows.Count);
        //reslut = gridDataToJson(dtSt, dtSt.Rows.Count, objtd);
        return(reslut);
    }
Esempio n. 3
0
    /// <summary>
    /// 创建原因:获取是否存在相同条件下的监测项目
    /// </summary>
    /// <param name="strMonitorId"></param>
    /// <param name="strItemId"></param>
    /// <param name="strStandId"></param>
    /// <param name="strConditionId"></param>
    /// <returns></returns>
    public string isExistItem(string strMonitorId, string strItemId, string strStandId, string strConditionId)
    {
        string result = "";
        TBaseEvaluationConItemVo objEvItem = new TBaseEvaluationConItemVo();

        objEvItem.STANDARD_ID  = strStandId;
        objEvItem.CONDITION_ID = strConditionId;
        objEvItem.MONITOR_ID   = strMonitorId;
        objEvItem.ITEM_ID      = strItemId;
        objEvItem.IS_DEL       = "0";

        DataTable dt = new TBaseEvaluationConItemLogic().SelectByTable(objEvItem);

        result = LigerGridDataToJson(dt, dt.Rows.Count);
        return(result);
    }
Esempio n. 4
0
    public static string EditData(string strStandId, string strCondtionId, string strMonitor, string strMonitorItems, string strMoveId)
    {
        string    result = "";
        DataTable dtis   = new DataTable();
        TBaseEvaluationConItemVo objcitems = new TBaseEvaluationConItemVo();

        objcitems.STANDARD_ID  = strStandId;
        objcitems.CONDITION_ID = strCondtionId;
        objcitems.MONITOR_ID   = strMonitor;
        objcitems.IS_DEL       = "0";
        dtis = new TBaseEvaluationConItemLogic().SelectByTable(objcitems);
        string[] strItems = strMonitorItems.Split(';');

        //string [] strMove=strMoveId.Split(';');

        if (!String.IsNullOrEmpty(strMoveId.ToString()))
        {
            string[] strMove = strMoveId.Split(';');
            if (DelMoveItems(objcitems, strMove, dtis))
            {
                if (EditItems(objcitems, strItems, dtis))
                {
                    result = "true";
                    string strMessage = new PageBase().LogInfo.UserInfo.USER_NAME + "编辑条件项项目成功";
                    new PageBase().WriteLog(i3.ValueObject.ObjectBase.LogType.EditEvaluationConItemInfo, "", strMessage);
                }
            }
        }
        else
        {
            if (EditItems(objcitems, strItems, dtis))
            {
                result = "true";
                string strMessage = new PageBase().LogInfo.UserInfo.USER_NAME + "编辑条件项项目成功";
                new PageBase().WriteLog(i3.ValueObject.ObjectBase.LogType.EditEvaluationConItemInfo, "", strMessage);
            }
        }

        return(result);
    }
Esempio n. 5
0
    /// <summary>
    /// 获取采用的标准项的上下限
    /// </summary>
    /// <param name="strItemID">项目ID</param>
    /// <param name="strConditionID">条件项ID</param>
    /// <param name="strUp">上限</param>
    /// <param name="strLow">下限</param>
    protected void getStandardValue(string strItemID, string strConditionID, ref string strUp, ref string strLow, ref string strConditionType)
    {
        TBaseEvaluationConItemVo objConItemVo = new TBaseEvaluationConItemVo();

        objConItemVo.ITEM_ID      = strItemID;
        objConItemVo.CONDITION_ID = strConditionID;
        objConItemVo.IS_DEL       = "0";
        objConItemVo = new TBaseEvaluationConItemLogic().Details(objConItemVo);
        //上限处理
        if (objConItemVo.DISCHARGE_UPPER.Length > 0)
        {
            //上限单位
            string strUnit = new TSysDictLogic().GetDictNameByDictCodeAndType(objConItemVo.UPPER_OPERATOR, "logic_operator");
            if (strUnit.Length > 0)
            {
                if (strUnit.IndexOf("≤") >= 0)
                {
                    strUnit = "<=";
                }
                else if (strUnit.IndexOf("≥") >= 0)
                {
                    strUnit = ">=";
                }
            }
            if (objConItemVo.DISCHARGE_UPPER.Contains(","))
            {
                string[] strValue = objConItemVo.DISCHARGE_UPPER.Split(',');
                foreach (string str in strValue)
                {
                    if (str.Length > 0)
                    {
                        strUp += (strUnit + str) + ",";
                    }
                }
                if (strUp.Length > 0)
                {
                    strUp = strUp.Remove(strUp.LastIndexOf(","));
                }
            }
            else
            {
                strUp = strUnit + objConItemVo.DISCHARGE_UPPER;
            }
        }
        //下限处理
        if (objConItemVo.DISCHARGE_LOWER.Length > 0)
        {
            //下限单位
            string strUnit = new TSysDictLogic().GetDictNameByDictCodeAndType(objConItemVo.LOWER_OPERATOR, "logic_operator");
            if (strUnit.Length > 0)
            {
                if (strUnit.IndexOf("≤") >= 0)
                {
                    strUnit = "<=";
                }
                else if (strUnit.IndexOf("≥") >= 0)
                {
                    strUnit = ">=";
                }
            }
            if (objConItemVo.DISCHARGE_LOWER.Contains(","))
            {
                string[] strValue = objConItemVo.DISCHARGE_LOWER.Split(',');
                foreach (string str in strValue)
                {
                    if (str.Length > 0)
                    {
                        strLow += (strUnit + str) + ",";
                    }
                }
                if (strLow.Length > 0)
                {
                    strLow = strLow.Remove(strLow.LastIndexOf(","));
                }
            }
            else
            {
                strLow = strUnit + objConItemVo.DISCHARGE_LOWER;
            }
        }
        strConditionType = new TBaseEvaluationInfoLogic().Details(new TBaseEvaluationConInfoLogic().Details(strConditionID).STANDARD_ID).STANDARD_TYPE;
    }