private bool ServiceDepartment_atDelete(object source, DeleteClickEventArgs e)
 {
     try
     {
         db.DeleteObject(s_Department);
         db.SaveChanges();
         PopulateServiceDepartment();
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionManager.Publish(ex);
         atMessageBox.Show(ex, ENOperation.Delete);
         return(false);
     }
 }
Esempio n. 2
0
 private bool FrmServiceInsuranceView_atDelete(object source, DeleteClickEventArgs e)
 {
     try
     {
         db.ServiceInsurances.DeleteObject(m_ServiceInsurance);
         db.SaveChanges();
         PopulateCombos();
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionManager.Publish(ex);
         atMessageBox.Show(ex, ENOperation.Delete);
         return(false);
     }
 }
Esempio n. 3
0
        /// <summary>
        /// </summary>
        public void rptItemListOnItemCommand(object source, RepeaterCommandEventArgs e)
        {
            if (e.CommandName == "Edit")
            {
                Response.Redirect(base.ModuleContext.EditUrl(string.Empty, string.Empty, "Edit", "itemid=" + e.CommandArgument));
            }

            if (e.CommandName == "Delete")
            {
                var args = new DeleteClickEventArgs
                {
                    ItemId = Convert.ToInt32(e.CommandArgument)
                };
                // send over to the presenter
                if (DeleteClick != null)
                {
                    DeleteClick(this, args);
                }
            }
            Response.Redirect(DotNetNuke.Common.Globals.NavigateURL());
        }