private void modifyInfoStripMenuItem1_Click(object sender, EventArgs e) { //权限管理 if (!CheckAuthority.Check(LoginData.Authority, Authority.WareHouse)) { MessageBox.Show("你还没有权限进行操作!. \n 请联系管理员. \n ", "Authority!", MessageBoxButtons.OK); return; } //权限管理|| LoginData.Authority == Authority.WareHouse //if (LoginData.Authority == Authority.Guest ) //{ // MessageBox.Show("你还没有权限进行操作!. \n 请联系管理员. \n ", "Authority!", MessageBoxButtons.OK); // return; //} int rowIndex = dgvMaterialList.CurrentCell.RowIndex; if (rowIndex < 0) { return; } ModifyMaterialInfo fmModify = new ModifyMaterialInfo(dgvMaterialList.Rows[rowIndex]); fmModify.ShowDialog(); }
private void btnOutMaterial_Click(object sender, EventArgs e) { //权限管理 if (!CheckAuthority.Check(LoginData.Authority, Authority.WareHouse)) { MessageBox.Show("你还没有权限进行操作!. \n 请联系管理员. \n ", "Authority!", MessageBoxButtons.OK); return; } //if (LoginDataInfo.LoginData.Authority == Authority.Guest || LoginDataInfo.LoginData.Authority == Authority.Buyer) //{ // MessageBox.Show("你还没有权限进行操作!. \n 请联系管理员. \n ", "Authority!", MessageBoxButtons.OK); // return; //} OutMaterial fm = new OutMaterial(); fm.ShowDialog(); UpdateMaterialList(); }