public void fnsave()
{
int i = 0;
bool status = false;
foreach (DataGridViewRow row in dataGridView1.Rows)
{
if (Convert.ToBoolean(String.IsNullOrEmpty(row.Cells["AllowAction"].Value.ToString().Trim()) ?
"False" : row.Cells["AllowAction"].Value.ToString()))
{
string modulename = row.Cells["ModuleName"].Value.ToString();
status = true;
i = user.SavePermission(Convert.ToInt32(cmbPermissions.SelectedValue), modulename,
Convert.ToBoolean(row.Cells["AllowAction"].Value.ToString()));
}
if (i > 0)
{
MessageBox.Show("Permission Details Added Successfully");
}
else
{
status = false;
}
}
}
private void btnUpdate_Click(object sender, EventArgs e)
{
fnsave();
}
问问题
429 次