예제 #1
0
    /// <summary>
    /// 檢查此PK是否已存在於DB,已存在為FALSE,不存在則為TRUE。
    /// </summary>
    /// <param name="htTemp"></param>
    /// <returns></returns>
    private bool CheckPATTERNSPECExist(Hashtable htTemp)
    {
        #region
        bool bResult = false;

        try
        {
            ALOModel.MaintainPatternSpec BCO = new ALOModel.MaintainPatternSpec(ConnectionDB);
            bResult = BCO.CheckPATTERNSPECExist(htTemp);

            if (!bResult)
            {
                strErrMsgAfterChecked += string.Format("該門市已設定 ( 群分類_大分類_PATTERN={0}_{1}_{2} ) 的控制檔;\\n", htTemp["ROOT_NO"], htTemp["PMA"], htTemp["PATTERN_NO"]);
            }
        }
        catch (Exception ex)
        {
            ErrorMsgLabel.Text = ex.Message;
            UpdatePanel1.Update();
        }

        return bResult;

        #endregion
    }
예제 #2
0
    /// <summary>
    /// 檢查此PK是否已存在於DB,已存在為FALSE,不存在則為TRUE。
    /// </summary>
    /// <param name="htTemp"></param>
    /// <returns></returns>
    private bool CheckPATTERNSPECExist(Hashtable htTemp)
    {
        #region
        bool bResult = false;

        try
        {
            ALOModel.MaintainPatternSpec BCO = new ALOModel.MaintainPatternSpec(ConnectionDB);
            string strErrMsg = "";
            bResult = BCO.CheckPATTERNSPECExist(htTemp);

            if (!bResult)
            {

                strErrMsg = string.Format("該門市已設定 ( 群分類_大分類_PATTERN={0}_{1}_{2} ) 的控制檔;", htTemp["ROOT_NO"], htTemp["PMA"], htTemp["PATTERN_NO"]);

                ErrorMsgLabel.Text = strErrMsg;
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "ClientScript", string.Format("alert('{0}');", strErrMsg), true);
            }

        }
        catch (Exception ex)
        {
            ErrorMsgLabel.Text = ex.Message;
        }

        return bResult;

        #endregion
    }