void Form1_UserChange(LtznUser ltznUser) { if (ltznUser != null && ltznUser.IsInRole("统计")) { canUpdate = true; button2.Enabled = true; } else { canUpdate = false; button2.Enabled = false; } }
//用户变动时 void UserChange(LtznUser ltznUser) { if (ltznUser != null && ltznUser.IsInRole("统计")) { viewCalModel.Visible = true; viewCalModel.Enabled = true; } else { viewCalModel.Visible = false; viewCalModel.Enabled = false; } }
void 数据修改窗体_UserChange(LtznUser ltznUser) { if (ltznUser != null && ltznUser.IsInRole("统计")) { canUpdate = true; tiqu.Enabled = true; } else { canUpdate = false; tiqu.Enabled = false; } }
//用户变动时 void UserChange(LtznUser ltznUser) { if (ltznUser != null && ltznUser.IsInRole("统计")) { btnCreate.Enabled = true; btnSave.Enabled = true; btnOldRiBao.Enabled = true; } else { btnCreate.Enabled = false; btnSave.Enabled = false; btnOldRiBao.Enabled = false; } if (ltznUser != null && ltznUser.IsInRole("技术月报模型")) { btnModel.Enabled = true; } else { btnModel.Enabled = false; } }
void 全厂日消耗窗体_UserChange(LtznUser ltznUser) { if (ltznUser != null && ltznUser.IsInRole("统计")) { canUpdate = true; flex原料.AllowEditing = true; button1.Enabled = true; } else { canUpdate = false; flex原料.AllowEditing = false; button1.Enabled = false; } }