private void dgRates_ItemCommand(object source, DataGridCommandEventArgs e) { switch (e.CommandName.ToLower()) { case "end": // End the rate's applicability. Orchestrator.WebUI.Security.Authorise.EnforceAuthorisation(eSystemPortion.AddEditRate); using (Facade.IJobRate facJobRate = new Facade.Job()) facJobRate.EndRate(Convert.ToInt32(e.Item.Cells[0].Text), ((Entities.CustomPrincipal)Page.User).UserName); BindRates(); break; } }