public bool DeleteLookup(DeletedLookupsWithAdminUser deletedLookupsWithAdminUser)
        {
            Logging.LogDebugMessage("Method: DeleteLookup, MethodType: Post, Layer: LookupsController, Parameters:  DeletedLookupsWithAdminUser = " + JsonConvert.SerializeObject(deletedLookupsWithAdminUser));

            using (LookupsBL lookupsBL = new LookupsBL())
            {
                return(lookupsBL.DeleteLookup(deletedLookupsWithAdminUser));
            }
        }
Example #2
0
        /// <summary>Delete Lookup </summary>
        /// <param name="deletedLookupsWithAdminUser">The DeletedLookupsWithAdminUser Object.</param>
        /// <returns>boolean value</returns>
        public bool DeleteLookup(DeletedLookupsWithAdminUser deletedLookupsWithAdminUser)
        {
            var dataset  = new DataSet();
            var response = false;

            Logging.LogDebugMessage("Method: DeleteLookup, MethodType: Post, Layer: LookupsDAL, Parameters: Parameters: DeletedLookupsWithAdminUser = "******"USP_DeleteLookup";
                    command.CommandType = CommandType.StoredProcedure;
                    command.Parameters.Add(new SqlParameter()
                    {
                        ParameterName = "@LookupIds", Value = deletedLookupsWithAdminUser.LookupIds
                    });
                    command.Parameters.Add(new SqlParameter()
                    {
                        ParameterName = "@AdminUserID", Value = deletedLookupsWithAdminUser.AdminUserID
                    });

                    using (SqlDataAdapter adapter = new SqlDataAdapter(command))
                    {
                        adapter.Fill(dataset);
                        if (dataset != null)
                        {
                            response = true;
                        }
                    }
                }
            }
            catch (SqlException sqlEx)
            {
                Logging.LogErrorMessage("Method: DeleteLookup, Layer: LookupsDAL, Stack Trace: " + sqlEx.ToString());
                throw;
            }
            catch (Exception ex)
            {
                Logging.LogErrorMessage("Method: DeleteLookup, Layer: LookupsDAL, Stack Trace: " + ex.ToString());
                throw;
            }
            return(response);
        }
Example #3
0
 /// <summary>Delete Lookup </summary>
 /// <param name="deletedLookupsWithAdminUser">The DeletedLookupsWithAdminUser Object.</param>
 /// <returns>boolean value</returns>
 public bool DeleteLookup(DeletedLookupsWithAdminUser deletedLookupsWithAdminUser)
 {
     Logging.LogDebugMessage("Method: DeleteLookup, MethodType: Post, Layer: LookupsBL, Parameters:  DeletedLookupsWithAdminUser = "******"Method: DeleteLookup, Layer: LookupsBL, Stack Trace: " + sqlEx.ToString());
         throw;
     }
     catch (Exception ex)
     {
         Logging.LogErrorMessage("Method: DeleteLookup, Layer: LookupsBL, Stack Trace: " + ex.ToString());
         throw;
     }
 }