示例#1
0
        /// <summary>
        /// 保存对节点名的修改
        /// </summary>
        /// <param name="iQuerySqlId"></param>
        /// <param name="iDataSetting"></param>
        /// <param name="strHeaderName"></param>
        /// <param name="strHeaderText"></param>
        public static void saveLabelEdit(int iQuerySqlId, int iDataSetting, string strHeaderName, string strHeaderText)
        {
            string sql = "update BS_DataHeaderSetting set HeaderText='" + strHeaderText + "' " +
                         "where QuerySql=" + iQuerySqlId + " and DataSetting=" + iDataSetting + " and HeaderName='" + strHeaderName + "'";

            BaseSQL.ExecuteSql(sql);
        }
示例#2
0
        /// <summary>
        /// 将删除节点操作同步到数据库
        /// </summary>
        /// <param name="iQuerySqlId"></param>
        /// <param name="iDataSetting"></param>
        /// <param name="strHeaderName"></param>
        public static void saveDeleteNode(int iQuerySqlId, int iDataSetting, string strHeaderName)
        {
            string sql = "delete from BS_DataHeaderSetting " +
                         "where QuerySql=" + iQuerySqlId + " and DataSetting=" + iDataSetting + " and HeaderName='" + strHeaderName + "'";

            BaseSQL.ExecuteSql(sql);
        }
示例#3
0
        /// <summary>
        /// 将新建的子节点数据保存到数据库中(与插入节点通用)
        /// </summary>
        /// <param name="iQuerySqlId"></param>
        /// <param name="iDataSetting"></param>
        /// <param name="strHeaderName"></param>
        /// <param name="strHeaderText"></param>
        /// <param name="strParentHeaderName"></param>
        public static void saveCreateChildNode(int iQuerySqlId, int iDataSetting, string strHeaderName, string strHeaderText, string strParentHeaderName)
        {
            string sql = "insert into BS_DataHeaderSetting(QuerySql,DataSetting,HeaderName,HeaderText,ParentHeaderName) " +
                         "values(" + iQuerySqlId + "," + iDataSetting + ",'" + strHeaderName + "','" + strHeaderText + "','" + strParentHeaderName + "')";

            BaseSQL.ExecuteSql(sql);
        }
示例#4
0
        /// <summary>
        /// 更新Tab说明
        /// </summary>
        /// <param name="iQuerySqlId"></param>
        /// <param name="iTabIndex"></param>
        /// <param name="strTabRemarks"></param>
        public static void UpdateTabRemarks(int iQuerySqlId, int iTabIndex, string strTabRemarks)
        {
            string strSql =
                "update BS_DataSetting set TabRemark= '" + strTabRemarks + "' " +
                "where QuerySQl=" + iQuerySqlId + " and TabIndex= " + iTabIndex;

            BaseSQL.ExecuteSql(strSql);
        }
示例#5
0
        /// <summary>
        /// 刷新BS_MenuButton表
        /// </summary>
        /// <param name="strMenuName"></param>
        public static void RefreshMenuButton(string strMenuName)
        {
            string sql = @"insert into BS_MenuButton(MenuName, ButtonName) " +
                         "select distinct '" + strMenuName + "','menuItemFlag' " +
                         "from BS_MenuButton " +
                         "where '" + strMenuName + "'+'menuItemFlag' not in(select menuName + buttonName from BS_MenuButton)";

            BaseSQL.ExecuteSql(sql);
        }
示例#6
0
        /// <summary>
        /// 初始化Tab信息
        /// </summary>
        /// <param name="iQuerySqlId"></param>
        /// <param name="iTabIndex"></param>
        /// <param name="strTabText"></param>
        /// <param name="strTabRemarks"></param>
        public static void InitTabInfo(int iQuerySqlId, int iTabIndex, string strTabText, string strTabRemarks)
        {
            string strSql =
                "insert into BS_DataSetting(QuerySql,TabIndex,TabText,TabRemark) " +
                "select " + iQuerySqlId + "," + iTabIndex + ",'" + strTabText + "','" + strTabRemarks + "' " +
                "where '" + iQuerySqlId.ToString() + iTabIndex.ToString() + "' not in (" +
                "select convert(varchar(10),QuerySql)+convert(varchar(10),TabIndex) from BS_DataSetting)";

            BaseSQL.ExecuteSql(strSql);
        }
示例#7
0
        /// <summary>
        ///给予角色权限对应窗口所有“按钮”的权限
        /// </summary>
        public static void GiveRoleAllButtonRight()
        {
            string strSql = @"insert into BS_UserMenuButton(UserNo,MenuButtonId) " +
                            "select a.UserNo,c.AutoId MenuButtonId " +
                            "from BS_RoleUser a " +
                            "left join BS_RoleMenu b on a.RoleNo=b.RoleNo " +
                            "left join BS_MenuButton c on b.MenuName=c.MenuName " +
                            "where convert(varchar(30),a.UserNo)+CONVERT(varchar(30),c.AutoId) not in " +
                            "		(select convert(varchar(30),a.UserNo)+CONVERT(varchar(30),c.AutoId) "+
                            "		from BS_UserMenuButton) ";

            BaseSQL.ExecuteSql(strSql);
        }
示例#8
0
        /// <summary>
        /// 获得MenuButtonId
        /// </summary>
        /// <param name="strMenuName"></param>
        /// <param name="strButtonName"></param>
        /// <returns></returns>
        public static int GetMenuButtonId(string strMenuName, string strButtonName)
        {
            string strSql = @"select autoId from BS_MenuButton " +
                            "where menuName like '" + strMenuName + "' and buttonName like '" + strButtonName + "'";
            DataTable dt = new DataTable();

            dt = BaseSQL.GetTableBySql(strSql);
            if (dt.Rows.Count == 0)
            {
                string sql       = string.Format("select Count(*) from BS_Button where ButtonName = '{0}'", strButtonName);
                string insertSql = "";
                if (DataTypeConvert.GetInt(BaseSQL.GetSingle(sql)) == 0)
                {
                    insertSql = string.Format("Insert into BS_Button (ButtonName, ButtonText) values ('{0}', '{1}')", strButtonName, "");
                    BaseSQL.ExecuteSql(insertSql);
                }

                insertSql = string.Format("Insert Into BS_MenuButton (MenuName, ButtonName) values ('{0}', '{1}')", strMenuName, strButtonName);
                BaseSQL.ExecuteSql(insertSql);
                dt = BaseSQL.GetTableBySql(strSql);
            }

            return((int)dt.Rows[0]["AutoId"]);
        }
示例#9
0
        /// <summary>
        /// 更改密码
        /// </summary>
        /// <param name="strPassworNew"></param>
        /// <param name="strLoginId"></param>
        public static void ChangePassword(string strPassworNew, string strLoginId)
        {
            string sql = @"update BS_UserInfo set LoginPwd = '" + strPassworNew + "' where LoginId like '" + strLoginId + "'";

            BaseSQL.ExecuteSql(sql);
        }
示例#10
0
        /// <summary>
        /// 更改部门编号时,同步更改以此编号为父部门编码的数据
        /// </summary>
        /// <param name="strDepartmentNo"></param>
        /// <param name="strNewDepartmentNo"></param>
        public static void UpdateDeptmentNoCorrelationData(string strDepartmentNo, string strNewDepartmentNo)
        {
            string sql = @"update BS_Department set ParentDepartmentNo = '" + strNewDepartmentNo + "' where ParentDepartmentNo like '" + strDepartmentNo + "'";

            BaseSQL.ExecuteSql(sql);
        }
示例#11
0
        /// <summary>
        /// 删除全部系统参数
        /// </summary>
        public void DeleteSystemParameter()
        {
            string sqlStr = "Delete from BS_SysParameter";

            BaseSQL.ExecuteSql(sqlStr);
        }
示例#12
0
        /// <summary>
        /// 批量更新零件信息
        /// </summary>
        public void UpdatePartsCode(string setSqlStr, string queryWhereSqlStr)
        {
            string sqlStr = string.Format("Update SW_PartsCode set {0} where {1}", setSqlStr, queryWhereSqlStr);

            BaseSQL.ExecuteSql(sqlStr);
        }