void DeletePriority(Object s, DataGridCommandEventArgs e)
        {
            int priorityId = (int)grdPriorities.DataKeys[e.Item.ItemIndex];

            if (!Priority.DeletePriority(priorityId))
            {
                lblError.Text = "Could not delete priority";
            }
            else
            {
                BindPriorities();
            }
        }
Пример #2
0
        public errorCompositeType DeletePriority(int iIdPriority)
        {
            errorCompositeType lstError = new errorCompositeType();

            try
            {
                Priority et = new Priority();
                et.DeletePriority(iIdPriority);
                lstError.bError = true;
                lstError.sError = "";
                return(lstError);
            }
            catch (Exception ex)
            {
                lstError.bError = false;
                lstError.sError = ex.Message;
                return(lstError);
            }
        }