Пример #1
0
 /// <summary>
 /// 权限控制
 /// </summary>
 void AuthorityControl()
 {
     if (!BasicInfo.IsFuzzyContainsRoleName("会议发布员"))
     {
         toolStrip.Visible = false;
     }
 }
 /// <summary>
 /// 权限控制
 /// </summary>
 void AuthorityControl()
 {
     if (!BasicInfo.IsFuzzyContainsRoleName("短信发布员"))
     {
         foreach (var item in toolStrip1.Items)
         {
             if (((ToolStripItem)item).Tag != null && ((ToolStripItem)item).Tag.ToString().ToUpper() != "VIEW")
             {
                 ((ToolStripItem)item).Enabled = false;
             }
         }
     }
 }
Пример #3
0
        /// <summary>
        /// 更新基础物品
        /// </summary>
        /// <param name="planCost">要修改的记录</param>
        /// <param name="newPrice">新基础物品</param>
        /// <returns>返回更改后的记录</returns>
        private View_F_GoodsPlanCost UpdatePlanPrice(View_F_GoodsPlanCost planCost, decimal newPrice)
        {
            if (!BasicInfo.IsFuzzyContainsRoleName("库管理员") &&
                (planCost.录入员编码 != BasicInfo.LoginID || planCost.日期 != ServerTime.Time.Date))
            {
                return(planCost);
            }

            planCost.单价 = newPrice;

            if (cmbUnit.SelectedIndex < 0)
            {
                cmbUnit.SelectedValue = planCost.单位ID;
            }

            //if (!m_basicGoodsServer.UpdateGoodsPrice(planCost.序号, newPrice, (int)cmbUnit.SelectedValue, BasicInfo.LoginID, out m_error))
            //{
            //    MessageDialog.ShowErrorMessage(m_error);
            //}

            return(planCost);
        }