public bool removeBranch(removeBranchDTO objBranch) { bool res = false; SqlCommand SqlCmd = new SqlCommand("spDeleteBranchMaster"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@Id", objBranch.Id); SqlCmd.Parameters.AddWithValue("@ActionBy", objBranch.ActionBy); int result = _unitOfWork.DbLayer.ExecuteNonQuery(SqlCmd); if (result != Int32.MaxValue) { res = true; } return(res); }
public HttpResponseMessage removeBranch(removeBranchDTO branch) { HttpResponseMessage message; try { // CustomerSiteMappingDataAccessLayer dal = new CustomerSiteMappingDataAccessLayer(); var dynObj = new { result = _Customermapping.removeBranch(branch) }; message = Request.CreateResponse(HttpStatusCode.OK, dynObj); } catch (Exception ex) { message = Request.CreateResponse(HttpStatusCode.BadRequest, new { msgText = "Something wrong. Try Again!" }); ErrorLog.CreateErrorMessage(ex, "CustomerSiteMapping", "removeBranch"); } return(message); }